Windows SBS 2008 - Login Script Not Working

Hi Experts,

I have a brand new network setup with Windows SBS 2008 and all windows 7 workstations. We are pushing down login scripts via GPO.

The GPO is working as the clients are getting mapped drives like they are suppose to, however they are not getting the printers from the login script.

If I manually run the scripts from the workstation it works just fine. I have also disabled UAC on all windows 7 workstations.

I have run the gpresults /h report and it shows the script ran just fine.

Here are the scripts

@echo off

set local

      title Processing login Script.. DO NOT INTERUPT.

      :: Logging Feature
      set LOGFILE=%SystemDrive%\Login_Script.log
      echo -------------------------------------------------------------->> %LOGFILE%
      echo [%DATE% %TIME:~0,8%] LOGIN script: %~dp0%~nx0>> %LOGFILE%
      echo [%DATE% %TIME:~0,8%] User: %USERNAME%>> %LOGFILE%
      echo [%DATE% %TIME:~0,8%] Logon Domain: %USERDOMAIN%>> %LOGFILE%
      echo [%DATE% %TIME:~0,8%] Logon Server: %LOGONSERVER%>> %LOGFILE%

      :: Assign Home Directory
      set USERHOMEDIR=\\servers\UserShares\%USERNAME%

push %~dp0

      :: Synch system clock with Domain Controller
      net time %LOGONSERVER% /set /yet > nul

      :: Map Network Drives
      net use Z: \\servers\Company

      :: Connect to NETWORK PRINTER SHAREs
      cscript login.vbs



Dim objNet
Set objNet = CreateObject("Wscript.Network")

      objNet.AddWindowsPrinterConnection "\\server\FrontOffice"
      objNet.AddWindowsPrinterConnection "\\server\BackOffice"

Set objNet = Nothing

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try to include LOGIN.VBS in your LOGIN.CMD.

At bottom of the LOGIN.CMD insert:

start \\server\scripts\LOGIN.VBS
Cliff GaliherCommented:
How login scripts are processed has changed significantly. Specifically, they run in a non-user context, so things like drive map ins don't work withoutbserious retooling. Looking at what your script does, everything can be replaced with group policy preferences, and would be the recommended solutionin your case.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.