username in installing service

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

username in installing service

Postby frank.dangelo » Wed Feb 22, 2017 5:02 pm

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: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: username in installing service

Postby FrancescoT » Thu Feb 23, 2017 11:08 am

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

Postby frank.dangelo » Mon Feb 27, 2017 1:20 pm

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: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: username in installing service

Postby FrancescoT » Mon Feb 27, 2017 2:05 pm

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

Postby frank.dangelo » Mon Feb 27, 2017 4:58 pm

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 239 times
rtmprintservice.zip
installaware files
(7.59 MiB) Downloaded 225 times

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: username in installing service

Postby FrancescoT » Tue Feb 28, 2017 11:32 am

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/viewtopic.php?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 4396 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 240 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

Postby frank.dangelo » Tue Feb 28, 2017 7:03 pm

great that all worked
thank you very much


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 39 guests