Ok I realise the title makes no logical sense what so ever but I'm sitting here looking at the problem and thats the only way to describe it. A little Background.
This year we had to add some more licenses to allow larger classes to use visual basic in computing classes. Obviosuly VB6 is defunct as far as MS is concerned but they agreed to upgrade our VB6 licenses to VS2005 and add more VS2005 licenses. Upgrades are a pain cos learning resources will be made obsolete but it can't be helped. We got our VS2005 license I installed all the prereqs from GPO, .net2, MSXML (the whole kitchen sink) used the admin installer to make a mst file for our needs and deployed it by GPO. That shoulda been it just some adjustment needed from Pupils and staff to the new menus etc.
Today I got a report that somone couldn't print. I looked on they're account no printers. I logged in myself no printers.
I use a user login script that I got from here to assign printers.
It worked on these machines before VS2005 and still works in the rest of the school so its got to be related.Code:Set oNet=wscript.createobject("wscript.network") Set objSysInfo = CreateObject("ADSystemInfo") Set AllPrinters = oNet.EnumPrinterConnections On Error Resume Next For i = 0 to AllPrinters.Count -1 Step 2 oNet.RemovePrinterConnection AllPrinters.Item(i+1), true Next strComputerDN = objSysInfo.ComputerName comp=Parse(strComputerDN) 'Wscript.Echo Comp Function Parse(strDN) Parse = Mid(strDN, InStr(strDN, "=") + 1) Parse = Mid(Parse, InStr(Parse, "=") + 1) Parse = MId(Parse, 1, InStr(Parse, "=") - 4) End Function Select Case Comp Case "R214" strPrinter="\\Server2\R214-Laser1" strprinter2="\\Server2\R214-ColourLaser" ........... End select If strPrinter <> "" Then oNet.AddWindowsPrinterconnection strPrinter oNet.SetDefaultPrinter strPrinter End If If strPrinter2 <> "" Then oNet.AddWindowsPrinterconnection strPrinter2 End If If strPrinter3 <> "" Then onet.AddWindowsPrinterconnection strPrinter3 End If
Even if I run the script from my desktop with an admin account it just appears to not execute. Anyone any ideas? There is nothin helpful in event log etc.


LinkBack URL
About LinkBacks




