cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
peakbagger66
Level 4

Specify NetworkService account when installing services?

Is it possible to specify the NetworkService account when configuring a service via the Organization\Components view in installshield? I can get it to install as LocalSystem if we leave it blank, but we need NetworkService instead. I have tried ".\NetworkService" but it fails during the install with a permissions error.

Thanks!
Labels (1)
0 Kudos
(7) Replies
peakbagger66
Level 4

I also tried the COmponent Wizard and entering "NT AUTHORITY\NetworkService" for the account. The installation dies with an "Error -1603".

Is it possible to specify the network service account for service install? :confused:

peakbagger66 wrote:
Is it possible to specify the NetworkService account when configuring a service via the Organization\Components view in installshield? I can get it to install as LocalSystem if we leave it blank, but we need NetworkService instead. I have tried ".\NetworkService" but it fails during the install with a permissions error.

Thanks!
0 Kudos
gknierim
Level 6

Have you tried just Network Service (with a space and no ./)?
0 Kudos
Robisupside
Level 3

Surprised nobody answered this and it's not coming up in any documentation.

I find the documentation on the fields in the UI for Installscript-msi projects quite misleading on setting a username as a logon for a new service.

What you need to do is create and set a windows property and set it to Network Service ID like this (note the escape char for the string) -

MsiSetProperty(ISMSI_HANDLE, "SGNETSER", "NT AUTHORITY\\NETWORK SERVICE");

then place that property in the user name field of the service install action with square brackets like this - [SGNETSER].

Leave the password blank and it'll install your service to use Network Service as the logon account.

cheers,

Rob
0 Kudos
instTst
Level 4

I am curious as to whether or not you can allow a user to input a username and password to install under. I was hoping i could use a dialog to grab a domain login and then pass it through.

I know this is an old thread, but hopefully one of you guys know?
0 Kudos
Robisupside
Level 3

sure I think, why not, load the user info into username and pass properties same as I've described.
0 Kudos
instTst
Level 4

And the same for the password field as well? even if i input something like [PasswordProperty] it shows as ************** in the field and it seems like it would treat it as a literal string as opposed to a property.
0 Kudos
RichaV
Level 2

I am not able to understamd this part
"What you need to do is create and set a windows property and set it to Network Service ID like this (note the escape char for the string) -

MsiSetProperty(ISMSI_HANDLE, "SGNETSER", "NT AUTHORITY\\NETWORK SERVICE");"
where exactly we have to create window property..
I have a windows service which I want to strat as networkservice. Can you plz help me with details how you did it.


Robisupside wrote:
Surprised nobody answered this and it's not coming up in any documentation.

I find the documentation on the fields in the UI for Installscript-msi projects quite misleading on setting a username as a logon for a new service.

What you need to do is create and set a windows property and set it to Network Service ID like this (note the escape char for the string) -

MsiSetProperty(ISMSI_HANDLE, "SGNETSER", "NT AUTHORITY\\NETWORK SERVICE");

then place that property in the user name field of the service install action with square brackets like this - [SGNETSER].

Leave the password blank and it'll install your service to use Network Service as the logon account.

cheers,

Rob
0 Kudos