There is a scripting mail list at: www.topica.com/lists/scripting.

www.microsoft.com/technet/scriptcenter/
http://cwashington.netreach.net/
http://www.borncity.com/WSHBazaar/WSHBooks.htm#L5
http://www.winscripter.com/



-----Original Message-----
From: Richard Sumilang [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 15, 2003 1:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [ActiveDir] Printer Script

Do you recommend any online sites or books to use as reference to write 
these VBScripts?


On Tuesday, July 15, 2003, at 10:20  AM, Roger Seielstad wrote:

> Probably don't need to remove it.
>
> I'd suggest maybe adding a line to check to see if it exists already 
> and
> only map the printer if it doesn't. That's generally a good practice.
>
> Your next task should be to rewrite your login script to be 100% 
> VBScript,
> just to make it all cleaner.
>
> --------------------------------------------------------------
> Roger D. Seielstad - MTS MCSE MS-MVP
> Sr. Systems Administrator
> Inovis Inc.
>
>
>> -----Original Message-----
>> From: Richard Sumilang [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, July 15, 2003 12:41 PM
>> To: [EMAIL PROTECTED]
>> Subject: Re: [ActiveDir] Printer Script
>>
>>
>> Awesome, that worked! Since this is a login script, should I
>> then have
>> a logoff script that removes it when the user signs off or will it
>> automatically be removed when they sign off? I just wan't to
>> avoid any
>> possible errors like it saying when the user logs back in next time
>> that the printer already exists or having it duplicate itself
>> when the
>> user logs back in because it runs the login script again.
>> Maybe I don't
>> have to worry about this?
>>
>>
>> On Tuesday, July 15, 2003, at 04:09  AM, Roger Seielstad wrote:
>>
>>> Ahh - simple. Save the .vbs file in the logon scripts
>> directory, and
>>> add
>>> this line to your existing logon script:
>>>
>>> Cscript.exe %0/../addprinter.vbs
>>>
>>> That should do it. (That's a zero not an oh, although I
>> could be wrong
>>> there)
>>>
>>> --------------------------------------------------------------
>>> Roger D. Seielstad - MTS MCSE MS-MVP
>>> Sr. Systems Administrator
>>> Inovis Inc.
>>>
>>>
>>>> -----Original Message-----
>>>> From: Richard Sumilang [mailto:[EMAIL PROTECTED]
>>>> Sent: Tuesday, July 15, 2003 1:51 AM
>>>> To: [EMAIL PROTECTED]
>>>> Subject: Re: [ActiveDir] Printer Script
>>>>
>>>>
>>>> If I save it as a .vbs how can I have a login script and
>>>> visual basic
>>>> script run during login?
>>>>
>>>>
>>>> On Monday, July 14, 2003, at 06:42  PM, Rick Kingslan wrote:
>>>>
>>>>> Bingo!  ;-)
>>>>>
>>>>> Rick Kingslan  MCSE, MCSA, MCT
>>>>> Microsoft MVP - Active Directory
>>>>> Associate Expert
>>>>> Expert Zone - www.microsoft.com/windowsxp/expertzone
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: [EMAIL PROTECTED]
>>>>> [mailto:[EMAIL PROTECTED] On Behalf Of
>>>> Bryan Schlegel
>>>>> Sent: Monday, July 14, 2003 8:21 PM
>>>>> To: [EMAIL PROTECTED]
>>>>> Subject: RE: [ActiveDir] Printer Script
>>>>>
>>>>> Save it as .vbs
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Richard Sumilang [mailto:[EMAIL PROTECTED]
>>>>> Sent: Monday, July 14, 2003 9: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/
>>>>> 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/
>>>>>
>>>>>
>>>>> 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/
>>>>>
>>>>>
>>>>
>>>> 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/
>>>>
>>> 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/
>>>
>>>
>>
>> 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/
>>
> 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/
>
>

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/
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/

Reply via email to