Batch file login.bat in Window 2012

We have configure login.bat under Default Domain Policy, User Configuration > Policies > Windows Settings > Remote Installation Services > Scripts > Logon under Window 2012 server.  However, I find that Window 10 client can't run the script and I need to manually click the script to remount all drivers. It works perfect for Window 7 client.

Any idea ?
AXISHKAsked:
Who is Participating?
 
Cliff GaliherCommented:
Ideally you shouldn't use a script at all. Group policy preferences are the better solution. But if you insist on using a script because of specific issues the  you need to set it under user config > Windows settings > Scripts (Logon/Logoff)

NOT under remote installation services.
0
 
Cliff GaliherCommented:
I don't think that policy does what you thu k it does. "Remote Installation Services" was a 2003-Era way of mass deploying OSes, and was replaced by "windows deployment services" in 2008.  A policy there would not run normal startup or login scripts.
0
 
AXISHKAuthor Commented:
Hi,

The script doesn't deploy any service. It only mounts the network drive.
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Chirag NagrekarSystem AnalystCommented:
Both windows 7 and windows 10 are in same domain ?

Did u check the UAC level on windows 10 machines ?
0
 
AXISHKAuthor Commented:
Yes.  Window 10 is logged with local administrator privilege right.

Thx
0
 
Chirag NagrekarSystem AnalystCommented:
I found similar problem and solution posted here.

https://serverfault.com/questions/768028/why-is-my-logon-script-not-mapping-any-drives

Please try this and let know.
0
 
Cliff GaliherCommented:
My point is that a script that mounts drives wouldn't  be put where you re putting it.  You are putting it in "Remote Installation Services" by your own description. That entire subtree in group policy is only for RIS deployments. So your script isn't running because windows clients don't run scripts from there.
0
 
McKnifeCommented:
Please also notice, that logon scripts are delayed by 5 minutes by default on windows 10, see https://support.microsoft.com/en-us/help/2895815/logon-scripts-do-not-run-for-five-minutes-after-a-user-logs-on-to-a-wi , it shows where to re-configure that if needed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.