username in installing service

Got a problem you cannot solve? Try here.
Post Reply
frank.dangelo
Posts: 11
Joined: Thu Feb 16, 2017 5:22 pm

username in installing service

Post by frank.dangelo »

I am trying to install a service with a user name and password. I get the values from a dialog box into servicename and servicepassword
When installing the service I put $servicename$ into the user name box and $servicepassword$ into the password box.
But when I look at the service after install it has the User name that was entered into the user field in the registration box.
I have checked the values just before the install and the values are correct.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: username in installing service

Post by FrancescoT »

Dear Frank,

I can only suppose that exist something wrong with the approach you used to handle your custom variables
At any rate, it's quite difficult to say where may be the error without knowing what your code does exactly.

How did you check the effective value of your custom script variables?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
frank.dangelo
Posts: 11
Joined: Thu Feb 16, 2017 5:22 pm

Re: username in installing service

Post by frank.dangelo »

HI,
I displayed a message box just before the create service and the variables were set correctly. I placed these variables in the username box as $var$
and the same for password. but it ignored them
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: username in installing service

Post by FrancescoT »

Dear Frank,

do you any chance to post a very "VERY" minimal project that replicates the issue?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
frank.dangelo
Posts: 11
Joined: Thu Feb 16, 2017 5:22 pm

Re: username in installing service

Post by frank.dangelo »

here is the project and the .exe files for service create a C;\installrtm directory and place files in there for project build
Attachments
rtmprintservice.zip
the c:\installrtm| directory for project
(1.94 MiB) Downloaded 369 times
rtmprintservice.zip
installaware files
(7.59 MiB) Downloaded 367 times
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: username in installing service

Post by FrancescoT »

Dear Frank,

there are several errors with your project and one of these, it's that the "Install Service" command is not sequenced correctly in your install script. Due of this, the service will be never installed on the target system.

The "Install Service" command is a Windows Installer Command (PURPLE COMMANDS).

If your setup is based on Windows Installer Engine (which is by default), Windows Installer Commands (PURPLE COMMANDS) are not executed immediately but deferred to Apply Install execution.
http://www.installaware.com/forums/view ... f=2&t=4338

*****
Attached you find my edited copy of your original project.

I used two new custom variables "SERVICE_USER" and "SERVICE_PASSWORD" to hold the Values passed to the the "Account Name" and "Account Password" parameters of the "Install Service" command. These variables are now declared within the "Define Setup Globals" Region (code line #65) of the install script.

PS
Note that the local ACCOUNTS have to be entered using the form ".\<USERNAME>
dialog.png
dialog.png (19.79 KiB) Viewed 6213 times
It's not necessary to change the location of the project source files ...I used relative paths.

Hope this helps you.

Regards
Attachments
Frank.zip
(5.65 MiB) Downloaded 396 times
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
frank.dangelo
Posts: 11
Joined: Thu Feb 16, 2017 5:22 pm

Re: username in installing service

Post by frank.dangelo »

great that all worked
thank you very much
Post Reply