For those of you that are still curious about this script. This one really works. I only tested this on windows XP though not sure about 2000
'----------------------------------------------------
'Remove all Network printers but not local printers
Set WshNetwork =...
'Remove All Network Printers
Set WSHPritners = WSHNetwork.EnumPrinterConnections
For Loop_Counter = 0 To WSHPrinters.Count - 1 Step 2
If Left(WSHPrinters.Item(Loop_counter + 1),2) = "\\" then
WSHNetwork.RemovePrinterConnection WSHPrinter.Items(Loop_Counter +1),True,T
End If
Next
this...
I need a Script that will remove all Network Printers stored on local machine. I have tried several that i found online and i can not get any of them to work! I want to inculde this small script before I map my printers so that they do not get messed up when my users see 5 printers.
Hmm Its seeems to be ingnoring the Ucase because
when i put If Left(ucase(computername),7) = "5001-ad" then it did not work no errors or anything just didnt map the printers
when i put If Left(ucase(computername),7) = "5001-AD" then it did work! (notice the caps in AD)
'Map Printers for Shenandoah
'Drew Dorben Jan 28th
'---------------------------'
Option Explicit
'Declaring Variables
Dim obj2200
Dim obj810c
Dim unc2200CL
Dim unc810ccl
Dim Objcomputername
Dim Computername
DIM strComputer
'Set type
Set obj2200 = CreateObject("Wscript.Network")
Set obj810c...
Option Explicit
'Declaring Variables
Dim obj2200
Dim obj810c
Dim unc2200CL
Dim unc810ccl
Dim Objcomputername
Dim Computername
'Set type
Set obj2200 = CreateObject("Wscript.Network")
Set obj810c = CreateObject("Wscript.Network")
Set objcomputername = Wscript.CreateObject("Wscript.Network")...
Something crossed my mind while i was writing this script, myabee you might know this. I was thinking since my computers are named 5001-CL<- followed by the computer number (CL standing for what room it is i.e computer Lab) that maybee instead of writing 5001-CL01 , CL02 , CL03, ect.. ect.. that...
Okay for
msgbox computername I get a popup with
5001-ADMIN01
FOR debug.print i get
a windows script host ERROR
Line 27
Char 1
Object doesnt support this property or Method 'Debug.Print'
Code 800A01B6
Source Microsoft VBScript runtime error
Sorry about posting in the wrong category i...
Yeah actually i made a mistake when i posted the topic.
It does actually look like
if Computername = "5001-admin01" Then
obj2200.AddWindowsPrinterConnection UNC2200cl
obj810c.addwindowsprinterConnection Unc810ccl
wscript.echo "Printers were connected successfully"
End if
Nothing happens...
Okay according to out current domain sturcture i no longer have access to group policys. So i am trying to map my printers by way of a logon script. I have a naming scheme for my computers so this is what i want to do. I would like to script that uses an if statement that checks the...
mattwray - I don't know how to "make sure port 1723 IP protocol 47 is open" - Can this be done in the PDM?
blin2000 - I'm not trying to let a VPN connection come inbound. I'm trying to establish a VPN connection via Microsoft's VPN adapter in DUN.
Thanks for the info, but I'm still...
Does anyone know why ntoskrnl.exe always wants to connect to the internet my firewall always pickes it up and im not sure why it wants to go out Along with other windows files as well also want to broadcast out to the internet like
(Generic hosts processes win 32 services), (NT Kernal &...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.