LogonCommands Continuously Running

For the last two weeks I have been setting up WDS for the first time and have been slowly getting the hang of the Unattend Answer file, but am struggling with one thing. The Logoncommands. From the Help menu it says that

LogonCommands specifies one or more commands to run the first time a user logs on to the computer.

and so I assumed that this meant the commands I input here would run once and once only after I logged in for the first time,

but every time I reboot the scripts I created, run again. Am I missing something here? The scripts I have map some network drives and remove the default metro apps from the startup screen. I tried putting these scripts in FirstLogonCommands, but they didn't work because I presume the mapping of network drives etc only work after the user has been fully created. Any suggestions? 

March 16th, 2015 6:14am

Hi Daikon,

There are differences between FirstLogonCommands and Logon commands,

Only FirstLogonCommands specifies commands to run the first time a user logs on to the computer. These commands are run only once.

LogonCommands specifies commands to run asynchronously when the user logs on.

Here are some samples for you

https://technet.microsoft.com/en-us/library/cc722150(v=ws.10).aspx

https://technet.microsoft.com/en-us/library/cc722397%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396

About your app issue, we suggest you delete these app for your windows image and then capture it for deployment.

If you need your all users map a network drive, group policy would always be the best option. Because start up command could be modified by users.

If you really need get that goal by using logon command, refer to the sample of Logoncommands and use command:

net use  x: \computer\share /persistent:yes

The reason why yours doesnt work might be caused by these setting cannot be used to launch applications that require administrative privileges to run.

Regards

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 1:11am

Hi D.Wu.

Thanx for the reply. I guess I already knew the answer and you confirmed my suspicions. Problem with using group policies is that we are a small company that has not made the move over to AD just yet (its in the works though) So I have been trying to find work arounds like above. But for now I will just run my scripts manually post role out for the few machines and once AD is live I will change. 

Regards

March 18th, 2015 4:33am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics