order of login script & startup folder

Dear Experts,
Does anyone know something about the execution order of an AD login script and shortcuts/programs in the startup folder?
We have a login script, which does a 'net use * /D /Y' in order to remove any existing drive mappings. It then does some drive mappings for the user's home dir etc. etc..
In addition to this, I wanted one particular computer to do a drive mapping of its own. I thought it was as simple as putting a batch file in the startup folder of this particular user's profile on this particular machine. However, as the user logs in, the startup-script apparently executes before the login script, resulting in the login script deleting the newly made drive mapping.

Any suggestions on doing this in a more beautiful way than adding a sleep-command in the startup script?

Also, any info on the execution order of startup vs login script would be highly appreciated.

Thank you!
nyholmgAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
tricepConnect With a Mentor Commented:
As opposed to deleting all drive mappings, you could remove them individually like this:

REM Remove H: mapping
NET USE H: /DELETE >nul

REM Map H: to users share
NET USE H: \\Vader\Users /YES >nul

I am not sure of the startup order, but I do know if you run your login script through group policy, it tends to run near the end.
0
All Courses

From novice to tech pro — start learning today.