You need to put that in a .vbs file, not a .bat or .cmd file It's a vbscript. Just copy the exact text I sent. Paste it into Notepad, modify it to reflect the name of your print server and printer. Save it as printmapper.vbs and put it in the same location where you currently have your login scripts. Then, edit your login script. At the top, just after the "Echo off" line - if you have that - add the following line: call printmapper.vbs Save your loginscript file. Now run it. It should work. Sincerely,
Dèjì Akómöláfé, MCSE MCSA MCP+I www.akomolafe.com www.iyaburo.com Do you now realize that Today is the Tomorrow you were worried about Yesterday? -anon ________________________________ From: [EMAIL PROTECTED] on behalf of Richard Sumilang Sent: Mon 7/14/2003 6:17 PM To: [EMAIL PROTECTED] Subject: Re: [ActiveDir] Printer Script I tried that and it didn't work. I took it out of the bat file and tried it manually and I got this error... ------------------------------------------------------------------------ ------------- C:\Documents and Settings>Set WshNetwork = CreateObject("WScript.Network") C:\Documents and Settings\>WshNetwork.AddWindowsPrinterConnection "\\AnotherComputer-27\HPLaserJ" 'WshNetwork.AddWindowsPrinterConnection' is not recognized as an internal or external command, operable program or batch file. C:\Documents and Settings\>_ ------------------------------------------------------------------------ ------------- This is how my bat file looks like ------------------------------------------------------------------------ ------------- net use Q: \\Server\Shared Set WshNetwork = CreateObject("WScript.Network") WshNetwork.AddWindowsPrinterConnection "\\ AnotherComputer-27\HPLaserJ" WshNetwork.SetDefaultPrinter "\\ AnotherComputer-27\HPLaserJ" Set WshNetwork = Nothing ------------------------------------------------------------------------ ------------- I am running Windows 2000 Server and all clients are Windows 2000 Pro. Thanks - Richard S. On Monday, July 14, 2003, at 04:38 PM, <[EMAIL PROTECTED]> wrote: > This should work: > > Set WshNetwork = CreateObject("WScript.Network") > WshNetwork.AddWindowsPrinterConnection "\\YourPrintServer\PrinterName" > WshNetwork.SetDefaultPrinter "\\YourPrintServer\PrinterName" > Set WshNetwork = Nothing > > If you put that in a login script. > > > Sincerely, > > Dèjì Akómöláfé, MCSE MCSA MCP+I > www.akomolafe.com > www.iyaburo.com > Do you now realize that Today is the Tomorrow you were worried about > Yesterday? -anon > > ________________________________ > > From: [EMAIL PROTECTED] on behalf of Richard Sumilang > Sent: Mon 7/14/2003 3:42 PM > To: [EMAIL PROTECTED] > Subject: [ActiveDir] Printer Script > > > > Has anyone wrote a script to connect a user to a shared printer on the > network when the log in? Is this possible? > > List info : http://www.activedir.org/mail_list.htm > List FAQ : http://www.activedir.org/list_faq.htm > List archive: > http://www.mail-archive.com/activedir%40mail.activedir.org/ > > > <winmail.dat> List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
<<winmail.dat>>