Loading
Migrating IS5.5 to IS2011 Issues
Hi All,

 

We are migrating our code from IS5.5 to IS2011,

 

In our Installer code we are using ControlService() to stop service, When we migrate the code to IS2011 the ControlService() is returning '0' and GetLastError() also returning '0'.

 

Can someone suggest what changes we need to do in-order to work with ControlService() function in the IS2011 code?

 

The same code which we is in IS5.5 is working as expected (stopping the service).

 

Thanks in advance!

 

Phani

  • J Stechnij (Flexera Software)

    Since InstallShield Professional version 6.x, GetLastError cannot be used to determine the last system error when calling a Win32 API (due to the fact that the InstallScript engine will call other Win32 APIs before control is returned to script). In Pro 6.x, the Err object was provided to obtain additional error information. The LastDllError property of the Err object can be used to obtain the last system error when calling Win32 APIs.

     

    Also note that the ServiceStopService InstallScript function can be used to stop a service without needing to interact with the Win32 service control APIs.
    Expand Post

Loading
Migrating IS5.5 to IS2011 Issues