Networking Forums

Networking Forums > Computer Networking > Windows Networking > Logonscript

Reply
 
 
Tom K
Guest
Posts: n/a

 
      04-26-2006, 02:52 PM
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...


 
Reply With Quote
 
 
 
 
seth
Guest
Posts: n/a

 
      04-26-2006, 04:26 PM
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...
>



 
Reply With Quote
 
Tom K
Guest
Posts: n/a

 
      04-26-2006, 05:06 PM
Works like a champ...!

Thanks,

"seth" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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...
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11