Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Mar 9th, 2006, 10:20 AM   #1
forcerr
Newbie
 
Join Date: Mar 2006
Posts: 8
Rep Power: 0 forcerr is on a distinguished road
my logon script HELP

gives me an error, and doesnt link the printers in KS1 or KS2, any ideas??

error is... Expected: Next


HELLPPP!!!

' -- West Vew Primary School --
' Classroom Logon Script
' 1. Maps Network Drives
' 2. Maps Printers
' 3. Sets correct printer, according to keystage
'----------------------------------------------------------

Option Explicit
Dim objNetwork, Printer1, Printer2, Printer3, PrinterDriver1, PrinterDriver2, PrinterDriver3, Server, adsDomainGroups


'-- Setting Objects --
Set objNetwork = CreateObject("WScript.Network")
Set adsDomainGroups = GetObject("WinNT://" & domain)

'-- Read security group membership --
adsDomainGroups.Filter = Array("Group")
For Each adsGroup in adsDomainGroups
 Group = UCase(adsgroup.name)


'-- Removes the networked drives --
 On Error Resume Next
objNetwork.RemoveNetworkDrive "s:"
objNetwork.RemoveNetworkDrive "x:"



'-- Connects Printers --
Printer1 = "\\server\IT1"
Printer2 = "\\server\IR1600"
Printer3 = "\\server\KS1Printer"
PrinterDriver1 = "HP Laserjet 1300 PCL 5e"
PrinterDriver2 = "Canon iR1600-2000 PCL5e"
PrinterDriver3 = "Brother HL-1450 series"
objNetwork.AddWindowsPrinterConnection Printer1, PrinterDriver1
objNetwork.AddWindowsPrinterConnection Printer2, PrinterDriver2
objNetwork.AddWindowsPrinterConnection Printer3, PrinterDriver3

if group = UCASE("ks1") then
	objNetwork.SetDefaultPrinter Printer3
elseif group = UCASE("ks2") then
	objNetwork.SetDefaultPrinter Printer1
end if


'-- Maps Drives -- 
Server = "\\server"
objNetwork.MapNetworkDrive "s:", server & "\software"
objNetwork.MapNetworkDrive "x:", server & "\shared"


WScript.Quit
forcerr is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:57 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC