This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Migrating IS5.5 to IS2011 Issues
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jul 26, 2011
12:36 AM
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
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
(2) Replies
‎Jul 26, 2011
11:46 AM
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.
Also note that the ServiceStopService InstallScript function can be used to stop a service without needing to interact with the Win32 service control APIs.
‎Jul 27, 2011
12:36 AM
Hi joshstechnij,
Thanks for your great help... Err.LastDllError property worked.
Thanks for your great help... Err.LastDllError property worked.