Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

win2k server login scripts ?

Thread Tools
 
Search this Thread
 
Old 08 March 2007, 11:12 PM
  #1  
spectrum48k
Scooby Regular
Thread Starter
 
spectrum48k's Avatar
 
Join Date: Feb 2006
Posts: 2,519
Likes: 0
Received 0 Likes on 0 Posts
Default 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?
Old 09 March 2007, 11:13 AM
  #2  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
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
Default

Splash screen could be html, so VBS.

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
Ill email you the htm we use if needed.
Old 09 March 2007, 10:45 PM
  #3  
spectrum48k
Scooby Regular
Thread Starter
 
spectrum48k's Avatar
 
Join Date: Feb 2006
Posts: 2,519
Likes: 0
Received 0 Likes on 0 Posts
Default

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

Last edited by spectrum48k; 09 March 2007 at 11:02 PM.
Old 11 March 2007, 08:41 PM
  #4  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
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
Default

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
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
WREXY
ScoobyNet General
3
12 May 2001 03:06 PM
IWatkins
Non Scooby Related
2
06 February 2001 10:43 PM
dsmith
Non Scooby Related
2
12 January 2001 10:40 AM
Neil Micklethwaite
ScoobyNet General
5
06 January 2001 01:47 PM



Quick Reply: win2k server login scripts ?



All times are GMT +1. The time now is 06:10 PM.