- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Installshield 2020 Installscript install
- 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
Installshield 2020 Installscript install
Getting the below error trying to install a service with ServiceAddService.
What is Line 426 looking for? Can I get access to service.rul to look at the code?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Check line 426 in your installscript source "Service.rul".
Check the existence of your service exe file before you call ServiceAddService.
regards
Markus
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I can't find service.rul on my machine anywhere. But I will try checking for the file first.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
That's what I'm assumed, because in a basic msi project "add a service" is "built-in functionality"
Do you use the installscript object "NT Services" ?
regards
Markus
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
No I don't. I don't see it in the list of objects in my IS.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Just as information.
From the product and license center there is the installation package "InstallShield 2020 InstallScript Objects" available (InstallShieldInstallScriptObjects.exe).
If you install this package, then you can add the InstallScript object "NT Services" to your InstallScript project. With this object it is very easy to define your program as service. Just add the object to your feature and go through the wizard ...
For standard cases you do not need any additional InstallScript code ...
regards
Markus
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Ok I found it and downloaded it. I'm setting it up now. One question. The setup is asking for the Domain\User Name and Password. We send those into the install as parameters can this be done?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sure, use the default settings at step 7 "Local system account" and modify later. To modify later in the setup, you can also use the properties of the NT service object, see the help file ...
prototype SetUserForNT_Service(STRING, STRING)
/* Function definition: */ function SetUserForNT_Service(szUser, szPwd) OBJECT oObject; begin try set oObject = GetObject("My NT Service"); if (!IsObject(oObject)) then MessageBox( "Failed to get object reference.", INFORMATION ); abort; endif; oObject.DomainUserName = szUser;
oObject.Password = szPwd; catch Sprintf( szStatus, "Unexpected Exception\n\nNumber: 0X%X\nDescription:" + "%s\nSource: %s\nHelp File: %s\nHelp Context: %d", Err.Number, Err.Description, Err.Source, Err.HelpFile, Err.HelpContext); MessageBox( szStatus, SEVERE ); abort; endcatch; end;
This is just a modified sample from NT Services object help, not tested !!
regards
Markus