you are trying to use vbscript in a batch environment
any script with a .bat or .cmd extension will be treated as a batch script
change the extension to .vbs and see how that works
http://www.rlmueller.net/BatchLogon.htm
"Tom K" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am trying to add a very simple vb script (as shown below) to my network
>loginscript, client os=xp pro.
>
> Set WshNetwork = CreateObject("WScript.Network")
> WshNetwork.AddWindowsPrinterConnection \\server1\printer1
>
> I get an "command" is not recognized as an internal or external command"
> for both commands.
>
> I must be doing something wrong....?
>
> I have the vb commands right in the logonscript itself.
>
> Does anyone know how to get the vb script to work in the loginscript...?
>
> Thanks,
> Tom...
>