Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

How to log on a service as the current login account instead of the Local System account?

Updated: 02 Jun 2010 | 5 comments
WayWay Lu's picture
0 0 Votes
Login to vote

Hi,

I add a service in the project in Wise fInstallation Studio 7.0. If I don't specify anything in "Login User Name" in the "Create Service Details" dialog, after the install, the service will show Log on as "Local System Account". What shoudl I fill in "Login User Name" field, so after the installation this service will show Log on as "This Account"? I tried to fill in ".\Username" in "Login User Name" field in "Create Service Details" dialog. The installation was rolled back after it was almost done. Looks like it does not accept ".\Username" in "Login User Name" field.

We want the person loggin onto the system to log on this particular service.

Any help is appreciated.

Thanks!

discussion Filed Under:

Comments

EdT's picture
24
Nov
2009
0 Votes 0
Login to vote

Have you tried entering an

Have you tried entering an actual username without any preceding periods and backslashes?

However, how do you intend to handle the situation where a different user logs onto the workstation?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

WayWay Lu's picture
24
Nov
2009
0 Votes 0
Login to vote

I don't want to specify any

I don't want to specify any user name. I actually want the servcie running for the login person. Is it possible to do so? When I check the Services (from My Compuetr > Manage > Services), I see some servcies which are set to "This Account". If you go to Servcies, open any service which has the "Log on as" set to "Network Service" instead of "Local System". When you go to the "Log On" tab, it is set to "This account". Taht's wht I want to do for my service.

Thanks!

GBH's picture
25
Nov
2009
0 Votes 0
Login to vote

AFAIK, Services in Windows

AFAIK, Services in Windows log-in as a specified account, BEFORE any user login.
If you're planning to make the user run as the login user every time an user logs-in the system, I don't think that is possible.

On the other hand, if you want the service to run as the user that installs it, I'll let you continue with the topic since probably other peolpe can help you more on MSI technology/Wise than I can.

Good luck

WayWay Lu's picture
01
Dec
2009
0 Votes 0
Login to vote

Hi, thank you for the reply.

Hi, thank you for the reply. And yes, please let me know how to have the service run as the user who installs it.
Thanks a lot!

EdT's picture
01
Dec
2009
0 Votes 0
Login to vote

ServiceInstall table

Look up the definition of the ServiceInstall table in the help file MSI.CHM
This table needs to be populated with all the information about your service.
Specifically, the following two fields which set the name and password for the service, can be defined using property values as they are of type "Formatted":
You will see below that you have to give each user the permissions to log on as a service  - have you allowed for this in your plans?

StartName

The service is logged on as the name given by the string in this column. If the service type is SERVICE_WIN32_OWN_PROCESS use an account name in the form: DomainName\UserName. If the account belongs to the built-in domain it is permitted to specify .\UserName. The LocalSystem account must be used if the type of service is SERVICE_WIN32_SHARE_PROCESS or SERVICE_INTERACTIVE_PROCESS. The CreateService function uses the LocalSystem account if StartName is specified as null and most services therefore leave this column blank.

Password

This string is the password to the account name specified in the StartName column. Note that the user must have permissions to log on as a service. The service has no password if StartName is null or an empty string. The Startname of LocalSystem is null, and therefore the password in this instance is null, so most services leave this column blank.

Note that after deleting a service that was installed with a user name and password, the installer cannot rollback the service without first using a custom action to get the password. The installer can acquire all the necessary information about the service except the password, which is stored in a protected part of the system. The custom action acquires the password by prompting the user, reading a property from the database, or reading a file. The custom action must then call ChangeServiceConfig, to supply the password, before reinstalling the service.

Windows Installer does not write the value entered into the Password field into the log file.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.