logon script not working with Server 2008

I have several scripts that run on logon that map different drives and printers based on group membership. I am testing Server 2008 for compatability and have run into the following problem: when logging on with a domain user nothing is mapped. There is also a script that places shortcuts on the desktop and that is still succesful, but neither the mapped drives or printers make it on. It also takes a very, very long time to log in.

This server is, in the long run, dsetined to be a terminal server for quite a few users, so getting the logon scripts to work is very important.

Thanks.
wally_llama1Asked:
Who is Participating?
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.

andrew_aj1Commented:
You did not provide the script that you are using, but I actually just made a vbs script this week to do exactly what you want. I use this script for both desktop machines and on a terminal server. All you need to do is replace the group name under the select case statement with your group names and point the drives/printers to the correct destination. Good Luck.
' VBScript to map drives based on group membership
'---------------------------------------------------
On Error Resume Next
 
Set WshNetwork = CreateObject("WScript.Network")
 
DomainString = WshNetwork.UserDomain
UserString = WshNetwork.UserName
 
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
 
'unmap all drives
WshNetwork.RemoveNetworkDrive "V:",true,true
WshNetwork.RemoveNetworkDrive "W:",true,true
WshNetwork.RemoveNetworkDrive "X:",true,true
 
 
For Each GroupObject In UserObj.Groups
	Select Case GroupObject.Name
		Case "Group 1"
			WshNetwork.MapNetworkDrive "Z:", "\\<Server>\<Share>"
			wshNetwork.AddWindowsPrinterConnection "\\<Server>\<Share>"
		Case "Group 2"
			WshNetwork.MapNetworkDrive "Y:", "\\<Server>\<Share>"
		Case "Group 3"
			WshNetwork.MapNetworkDrive "X:", "\\<Server>\<Share>"
	End Select
Next
 
WScript.Quit

Open in new window

0
wally_llama1Author Commented:
Sorry for not including the printer mapping script. Yours is much nicer and I will probably replace mine with it, but I do notknow if that will solve the problem. SInce first asking the quesiton I created an OU just for remote users that my current printer mapping script does not apply to and the slow log in problem was solved.

I have disabled UAC on the 2008 server. Is there an issue with mapping printers specific to Server 2008?
0
andrew_aj1Commented:
First I do not recommend you disable UAC on Server 2008. It is much improved over UAC on Vista and you should want to keep your server as secure and safe as possible.
I am unaware of any specific printer mapping issues with Server 2008 as long as there are drivers for the device. I deployed this script on a network that had no fewer than 11 different printer models from various vendors.
Test the script when you can and let me know if it works for you. If it does not maybe we can modify it for your situation.
0

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
LimestoneDataCommented:
hello, pardon my jumping in here but I am looking for a solution much like what it appears your scrip is doing.. can you clarify a couple of things for me? Thanks in advance.

You said,

All you need to do is replace the group name under the select case statement with your group names
For Each GroupObject In UserObj.Groups
        Select Case GroupObject.Name
                Case "Group 1
"
                        WshNetwork.MapNetworkDrive "Z:", "\\<Server>\<Share>"
                        wshNetwork.AddWindowsPrinterConnection "\\<Server>\<Share>"
                Case "Group 2
"
                        WshNetwork.MapNetworkDrive "Y:", "\\<Server>\<Share>"

Open in new window

So does that mean all I would have to do is, replace the highlighted text with my group names.. for example CAD and ACCOUNTS and then I could set the drives I want to be mapped for each?

Or do I need to add more lines of the "select case" statement each one with a different GroupObject.CAD and GroupObject.ACCOUNTS ya still a little hazy...

Also I note you put - Set UserObj = GetObject("WinNT://"
Where as my installation is in Windows would I need to change that as well?

Finally I know how to call a .bat file can I just run the .vbs script from the same place in the same way or do I have to call it from a .bat file? Sorry really rookie questions I know...

The reason I ask is I need to have the .bat file run unless there is a way to put in THIS script a line I need to run each time users login...

cmd /c "start \\printsrv\PCClient\win\pc-client-local-chache.exe --slient"

Our print tracking software requires this to be there for each login... so can this be added to your script, or do I run my bat file and after this print thingy is called then call your vbs script?

Thanks very very much for this help, I think I maybe need to open a new question to give you some points as this is obviously bordering on answering an entirely new issue, if you would prefer that let me know I would be happy to do so..

0
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
Windows Server 2008

From novice to tech pro — start learning today.

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.