How to install NT service in Install Shield
Posted 08 April 2004 - 12:14
LaunchAppAndWait(WINDOWSDIR^"instsrv, TARGETDIR^"zerospam.exe" -d TARGETDIR^"\conf\\", LAAW_IPTION_HIDDEN);
Can someone help me use the install shield method for installing and uninstalling NT services using the commandline parameter I'm using??? I really need to do this... please help me.
Thanks and I hope someone can help me with my problem.
Posted 08 April 2004 - 15:51
I'm guessing you didn't copy and paste because the option should be LAAW_OPTION_HIDDEN
Also the TARGETDIR^"\conf\\" either has one too many slashes or one too few (in the fron of conf)
I personally just use the -service switch and never have had any problems
ie. LaunchAppAndWait(TARGETDIR^"SwitchServer3.exe", " -service", WAIT);
Posted 10 April 2004 - 18:02
and it should be WINDOR not WINDOWSDIR.
Without your actual code and more details about the error message it's hard to figure out what's going wrong.
Have you tried the NT Service Object that comes with InstallShield, or one of the NT Service sample scripts here on InstallSite?
Posted 11 April 2004 - 10:43
szServicePathFile = TARGETDIR^"zerospam.exe" + " -d \"" + TARGETDIR^"\\conf\\"";
ServiceAddService ("ZeroSpamUniversal", "ZeroSpamUniversal", "", szServicePathFile, TRUE, "");
ServiceStartService ("ZeroSpamUniversal", szServicePathFile);
Am I using the correct parameter for the method serviceAddService()???? I tried getting the return value for the result and always fail.
With regards to what Xitch13 says, is your "-service" your command line??? Can I use the same command line even if I have my own commandline parameter??? This is my previous code while I was using the LaunchAppAndWait() method.
szApplicationPath = WINSYSDIR^"instsrv.exe";
LongPathToQuote( szApplicationPath, TRUE );
szApplicationPath3 = TARGETDIR^"zerospam.exe\"";
LaunchAppAndWait(szApplicationPath, "ZeroSpamUniversal \"" + szApplicationPath3, LAAW_OPTION_HIDDEN );
Does ServiceAddService() only works in Windows 2000??? This should also work in windows xp right???
Also I want to know if ever I was able to successfully install NT, how can I uninstall it also.
I hope to hear from you guys again... thanks and have a good day!
Posted 11 April 2004 - 12:05
svScriptFile = C:\Professional\Source\Code\BackEnd\RunTime\ISFunc\Service.rul
nvLineNumber = 581
nvError = 1053
Posted 11 April 2004 - 13:03
have previously posted before this reply. Now, I'm having a problem starting the service even if I already used
the ServiceStartService(). When I tried restarting it manually, an error occurred saying: Error 1053: The
service did not respond to the start or control request in a timely fashion. I searched in google and found a
description of the error and their solution to the problem. They require to have an administrative privilege to be
able to start the installation, and I have an admin account in my system. Then most of the solutions they offer are for other accounts only. In my case, I'm using my account. I don't understand the problem. Please help me solve this problem.