Jump to content

Dwelb

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Dwelb

  1. Hi all, I've been on this all afternoon and have to give up today due to lack of free staff.. If I manually run the VBScript on a user profile/desktop, everything works a treat! All printers disappear, two re-appear and on is set as default! If it is invoked via logon.bat, it fails to complete. No error message or completion line in the paused output either. I've dropped this on three different users/machines and it still acts the same.. More testing tomorrow.. Any additional ideas guys/girls??
  2. Hi Rob, Thank you for testing and confirming all is well.. Much appreciated.. I can only further test tomorrow afternoon now due to user availability.. Someone else has written this script and entered the "dim oNetwork".. Can you advise what this entails? Tia..
  3. Hi, I've attached what was working and what i require to work.. I'm seeing other info out there mentioning that we do not need the ""'s around the remove line. 1. Can anyone advise if this is the case? 2. If the script error-ed out, would it continue because of the "ON ERROR RESUME NEXT" line? Thanks in advance and sorry for the delayed replies..
  4. Hi, the error message is below:
  5. Apologies, now amended original post to correct..
  6. Hi all, I've been given a VBScript to amend to resolve a printer issue we have on site.. I'm missing something that's causing an error.. I believe its related to the "" on the printer remove lines.. Can anyone advise further? I know it looks odd, but i need to remove an old printer setup and then refresh it, as such.. The script is: ' SET DEFAULT PRINTER SCRIPT ON ERROR RESUME NEXT dim oNetwork Set oNetwork = WScript.CreateObject("WScript.Network") ' INSTALL PHOTOCOPIER AS NETWORK PRINTER ONetwork.RemovePrinterConnection "\\bobs-server\ICTSUITE COPIER COLOUR" ONetwork.RemovePrinterConnection "\\bobs-server\ICTCOPIER BLACK & WHITE" ONetwork.AddWindowsPrinterConnection "\\bobs-server\ICTSUITE COPIER COLOUR" ONetwork.AddWindowsPrinterConnection "\\bobs-server\ICTCOPIER BLACK & WHITE" Select Case ucase(oNetwork.ComputerName) CASE "SONY-VAIO" ONetwork.SetDefaultPrinter "HP5940" CASE ELSE ONetwork.SetDefaultPrinter "\\bobs-SERVER\ICTCOPIER BLACK & WHITE" End Select WScript.Quit ' End of Script Any feedback would be really appreciated as this is causing no end of bother at the moment.. Unfortunately, we are extremely limited on testing, so hopefully a correct script will do the job once corrected.. Thanks in advance all, D..
×
×
  • Create New...