Recommended Posts

Good Morning All 

 

This is my first post, so please be gentle :) 

 

I am looking to network 8 printers but i want them to be mapped to a username e.g 

'customer services script
Dim obj
	Set obj = CreateObject("Wscript.Network")
	
WScript.Echo obj.UserName = "gbcg01,gbxx01,gbxx02" Then
	objWshNetwork.AddWindowsPrinterConnection "\\Myserver\Printer
	
	
'run my next script for the next department
objShell.Run "Warehouse_script.vbs"

We cannot use GPO as we are a subsidiary and the main IT are useless

 

any chance of a hand? 

Thanks 

 

 Something like this:

  Quote

Set objNetwork = CreateObject("WScript.Network")

If objNetwork.UserName = "TestUsername1" Then
objNetwork.AddWindowsPrinterConnection "\\server\printer x"

objNetwork.SetDefaultPrinter "\\server\Printer X"

end if

If objNetwork.UserName = "TestUsername2" Then

     objNetwork.AddWindowsPrinterConnection "\\server\printer y"
    objNetwork.SetDefaultPrinter "\\server\Printer Y"

end if

 

This topic is now closed to further replies.
  • Posts

  • Recent Achievements

    • Experienced
      dismuter went up a rank
      Experienced
    • One Month Later
      mevinyavin earned a badge
      One Month Later
    • Week One Done
      rozermack875 earned a badge
      Week One Done
    • Week One Done
      oneworldtechnologies earned a badge
      Week One Done
    • Veteran
      matthiew went up a rank
      Veteran
  • Popular Contributors

    1. 1
      +primortal
      684
    2. 2
      ATLien_0
      266
    3. 3
      Michael Scrip
      198
    4. 4
      +FloatingFatMan
      181
    5. 5
      Steven P.
      142
  • Tell a friend

    Love Neowin? Tell a friend!