Re: network printer script error

Tech-Archive recommends: Fix windows errors by optimizing your registry



If the name is legit and legible.

Go for it.

It happens what happens on any window smachine.


It will read from a named connection.

If it is an IP address 30.000 miles away
or on an Mars ice shelf, it will.

Glory to the founders of the protocols.




"Charles Blair" <charles_blair@xxxxxxxxxxx> wrote in message news:%23G4cOEJJHHA.1008@xxxxxxxxxxxxxxxxxxxxxxx
What happens if you copy the script to the server and run it locally?

Charles

"Zac Mutrux" <ZacMutrux@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:842F71B5-21E8-4AAF-B5F9-61608FBCCE31@xxxxxxxxxxxxxxxx
I am trying to add a network printer to computers automatically. It seems to
work fine on Windows XP, but it throws an error on Windows Server 2003.

The script:

Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\server\labprint"

The error:

---------------------------
Windows Script Host
---------------------------
Script: \\VYDC.local\SysVol\VYDC.local\Policies\{F0E4DA90-E6A0-40E8-A1D5-384785B01C89}\User\Scripts\Logon\printers.vbs
Line: 2
Char: 1
Error: The filename, directory name, or volume label syntax is incorrect.
Code: 8007007B
Source: (null)

---------------------------
OK
---------------------------

Thanks for any assistance you may be able to offer.

Zac



.



Relevant Pages

  • Re: Still got problems running a VB Script
    ... > I've re-installed Windows Script host, but still this one script fails to run. ... > people that pee in our big sandbox. ... It could be that you can reinstall Windows Script Host, ... >>> Duncan ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: problem with XP SP2 rsh.exe (post KB892099 hotfix)
    ... Again, I'm just throwing it out, but the Windows Script Host does indeed handle stdout and stdin. ... but I would suspect that the pearl is seeing some spinoff of 'Lockdown" in SP2. ...
    (microsoft.public.windowsxp.help_and_support)
  • .wsf works in Windows 2000 but not in Windows 2003
    ... on Windows 2000, but dont run on Windows 2003. ... If(Not TestMe) Then Exit Function ... Microsoft Windows Script Host Version 5.6 ...
    (microsoft.public.scripting.wsh)
  • Re: SetTime2.vbs file not working anymore
    ... Probably it can't find the server or the server isn't returning the date. ... > Set Your Windows Clock Automatically ... > "Windows Script Host" ... > Source: Microsoft VBScript runtime error ...
    (microsoft.public.windowsxp.general)
  • Re: Best books for learning to script?
    ... > servers as well as performing routine tasks on our workstations. ... I am using a book called Windows Script Host by Petter G. Aitken ISBN ...
    (microsoft.public.windows.server.scripting)