- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- starting a service using installscript
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
starting a service using installscript
i tried starting service after creating it. but it is'nt working. Although the creation of service is successfull.
kindly help.
Below is the code:
function AddService(hMSI)
string szServiceStartName, szPassword,szStartServiceArgs;
string szServiceName, szServiceDisplayName, szServiceDescription, szServicePathFile;
begin
szServiceName = "Platform Service";
/*szServiceDisplayName = "Platform Service";
szServiceDescription = "Service ";
szServicePathFile = INSTALLDIR^"\\ClientFiles\\PlatformMonitorService.exe";
if (!ServiceExistsService ( szServiceName )) then
if (!ServiceAddService(szServiceName, szServiceDisplayName, szServiceDescription, szServicePathFile, FALSE, ""))then
MessageBox("Service created successfully!", INFORMATION);
else
MessageBox("Service could not be created!", SEVERE);
endif;
endif;*/
szStartServiceArgs="";
ServiceStartService (szServiceName,szStartServiceArgs);
end;