Map Network Drives with SBS_LOGIN_SCRIPT.bat using VBS?
I am trying to edit the SBS_LOGIN_SCRIPT.bat and I have the below file: \\SERVER\NETLOGON\logon.vbs
logon.vbs:
Code:
Set wshNetwork = CreateObject("WScript.Network")
wshNetwork.MapNetworkDrive "h:",
"\\SPSBS\users\" & wshNetwork.UserName
wshNetwork.MapNetworkDrive "g:",
"\\SPSBS\gemensam" & wshNetwork.UserName
What am I suppose to add into the SBS_LOGIN_SCRIPT.bat to make the VB script run? I have tried calling it via a Batch file but that didnt even work. I have also tried calling it through call ...path..\login.vbs that to no avail. Can anyone please help.
Re: Map Network Drives with SBS_LOGIN_SCRIPT.bat using VBS?
I am actually using a little backwards from your design. I have got the .vbs script call the SBS_LOGIN_SCRIPT. And then I have to modufy the users and templates to assign my login scripts. So the last line of my login.vbs says
\\SBSservername\sysvol\sbsdomain.company.local\scripts\SBS_LOGON_SCRIPT.bat
I also have 2 more scripts. The above one and the one with the SBS_LOGON_SCRIPT.bat commented out. The second one makes for a faster user logon experience, after the environment is setup and stable.
Re: Map Network Drives with SBS_LOGIN_SCRIPT.bat using VBS?
The last lines should read as:
follows;
-------
dim Shell
set shell = createobject("wscript.shell")
shell.run
"\\SBSservername\sysvol\sbsdomain.company.local\scripts\SBS_LOGON_SCRIPT.bat"
set shell = nothing
-------