win2k server login scripts ?
#1
win2k server login scripts ?
There appears to be several ways to implement login scripts:
a) batch files
b) vbs files
c) 3rd party apps like Kixstart
All I need is to use one common login script for all users eg:
1. Map H: to their home folder on the server
2. Map P: to the public folder on the server
3. Display a splash screen in .jpg format (it can be any format)
I understand what to put in the script but am unsure as to what technique to use (a,b or c) Whats the best option?
a) batch files
b) vbs files
c) 3rd party apps like Kixstart
All I need is to use one common login script for all users eg:
1. Map H: to their home folder on the server
2. Map P: to the public folder on the server
3. Display a splash screen in .jpg format (it can be any format)
I understand what to put in the script but am unsure as to what technique to use (a,b or c) Whats the best option?
#2
Scooby Regular
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like
on
1 Post
Splash screen could be html, so VBS.
Ill email you the htm we use if needed.
Code:
On Error Resume Next Public IE Set wshNetwork = WScript.CreateObject( "WScript.Network" ) Set wshShell = WScript.CreateObject("WScript.Shell" ) CreateIE() user = wshNetwork.username domain = wshNetwork.userdomain 'Echo info to front end 'ie.document.all.lblUser.InnerHTML = "<font size=2pt face=arial color=#ffffff>User: " & user& "</font>" 'ie.document.all.lblDomain.InnerHTML = "<font size=2pt face=arial color=#ffffff>Domain: " & domain & "</font>" 'ie.document.all.lblComputer.InnerHTML = "<font size=2pt face=arial color=#ffffff>Computer: " & WSHNetwork.ComputerName & "</font>" mapNetwork "H:", "\\Server\Users\" & user mapNetwork "P:", "\\Server\Share" ' Begin Sub's sub mapNetwork(driveletter, netshare) 'check if drive is already mapped by enumarating through mapped drives 'if it is then remove the current mapping Dim Drive CheckNetworkMapping = False For Each Drive In wshNetwork.enumNetworkDrives If LCase(Drive) = LCase(DriveLetter) Then WshNetwork.RemoveNetworkDrive driveletter End If Next 'now map the drive wshNetwork.MapNetworkDrive driveletter, netshare end sub Sub CreateIE() On Error Resume Next Set IE = CreateObject("InternetExplorer.Application") wshPath = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\")) With IE .navigate wshPath & "YourPage.htm" .resizable=0 .height=365 .width=660 .menubar=0 .toolbar=0 .statusBar=0 .visible=1 End With Do while ie.Busy ' wait for page to load Wscript.Sleep 100 Loop ie.document.body.style.cursor = "wait" End Sub
#3
Thanks David
So from what I can gleen from the internet, to execute a vbs script I need to invoke Group Policy Objects ?
As its my first one, I think I might experient with a simple .bat file and the NET USE command. I understand all I have to do to get this working is reference it in the AD user > profile tab. Then I just place the script in %systemroot%\SYSVOL\DomainName\Scripts
Do I need to do anything else ? Some internet texts mention I need to activate login script in the Group Policy Editor ?
By the way I'll definitely use your VBS script, but like I say, perhaps try my first one with a simple .bat file
So from what I can gleen from the internet, to execute a vbs script I need to invoke Group Policy Objects ?
As its my first one, I think I might experient with a simple .bat file and the NET USE command. I understand all I have to do to get this working is reference it in the AD user > profile tab. Then I just place the script in %systemroot%\SYSVOL\DomainName\Scripts
Do I need to do anything else ? Some internet texts mention I need to activate login script in the Group Policy Editor ?
By the way I'll definitely use your VBS script, but like I say, perhaps try my first one with a simple .bat file
Last edited by spectrum48k; 09 March 2007 at 11:02 PM.
#4
Scooby Regular
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like
on
1 Post
You can make it run the script by setting it in the User Profile tab in AD users and computers. You dont need to use the GPO's to do it.
you can just give it the path to the script..
so copy it to netlogon (c:\WINDOWS\SYSVOL\domain\scripts)
then just set logon script to be "test.vbs" or similar
David
you can just give it the path to the script..
so copy it to netlogon (c:\WINDOWS\SYSVOL\domain\scripts)
then just set logon script to be "test.vbs" or similar
David
Thread
Thread Starter
Forum
Replies
Last Post
IWatkins
Non Scooby Related
2
06 February 2001 10:43 PM