Re: Printer Install
- From: "drew" <drewvirgili@xxxxxxxxxxxxxx>
- Date: 12 Sep 2005 12:31:57 -0700
My company is currently using Novell to manage all of our printers,
and we are switching to Microsoft.I was wondering how I would write a
..vbs script that checks to see which Novell printers the user has
currently installed and then add a windows printer connection for just
those printers. I have the printers installed on a Windows Server 2003
Server and they are shared and listed in AD. Any help would be
appreciated because this really sucks doing this by hand on all 500 or
so computers!
"Charles Yang [MSFT]" wrote:
> HI Thomas,
>
> Welcome to post here.
>
> Issue description:
> ===========
>
> I understand that you want to install the print driver automatically on
> every WS.
>
> Analyzing and suggestions:
> ================
>
> Generally speaking, this should be scripting issue, as we do not official
> support scripting in this newsgroup, so we could you guarantee if the
> script will work or not, I offer a sample script for your convenience:
>
>
> Set WshNetwork = CreateObject("WScript.Network")
> WshNetwork.AddWindowsPrinterConnection "\\PrintServer\Printer"
> WshNetwork.SetDefaultPrinter "\\PrintServer\Printer"
>
> We can also use rundll32 command to add a printer in logon script.
>
> To Install a printer:
> rundll32 printui.dll,PrintUIEntry /in /n \\server\printer
>
> Detail Information:
> http://www.microsoft.com/technet/community/scriptcenter/printing/scrprn01.ms
> px
>
> It is also your best internet to post to MSDN newsgroup, there you may get
> a more sharing:
>
> http://msdn.microsoft.com/newsgroups/default.asp
>
> Hope the above information helpful. Any further concerns would be
> appreciated. I will be here waiting for your updates.
>
>
>
> Best regards,
>
> Charles Yang (MSFT)
>
> Microsoft CSS Online Newsgroup Support
>
> Get Secure! - www.microsoft.com/security
>
> ======================================================
> This newsgroup only focuses on SBS technical issues. If you have issues
> regarding other Microsoft products, you'd better post in the corresponding
> newsgroups so that they can be resolved in an efficient and timely manner.
> You can locate the newsgroup here:
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx
>
> When opening a new thread via the web interface, we recommend you check the
> "Notify me of replies" box to receive e-mail notifications when there are
> any updates in your thread. When responding to posts via your newsreader,
> please "Reply to Group" so that others may learn and benefit from your
> issue.
>
> Microsoft engineers can only focus on one issue per thread. Although we
> provide other information for your reference, we recommend you post
> different incidents in different threads to keep the thread clean. In doing
> so, it will ensure your issues are resolved in a timely manner.
>
> For urgent issues, you may want to contact Microsoft CSS directly. Please
> check http://support.microsoft.com for regional support phone numbers.
>
> Any input or comments in this thread are highly appreciated.
> ======================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> =====================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> --------------------
> | Thread-Topic: Printer Install
> | thread-index: AcWtgZ3euc9jHiDxQNaMnRdLttVCmw==
> | X-WBNR-Posting-Host: 216.185.86.122
> | From: "=?Utf-8?B?RGF2ZXZkbQ==?=" <Davevdm@xxxxxxxxxxxxxxxxxxxxxxxxx>
> | References: <A7266759-7E72-4352-883F-A17F5B727563@xxxxxxxxxxxxx>
> | Subject: RE: Printer Install
> | Date: Tue, 30 Aug 2005 09:41:06 -0700
> | Lines: 103
> | Message-ID: <BEF5B0BE-A9F3-4987-AB90-FCB09BBA9A07@xxxxxxxxxxxxx>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.windows.server.sbs
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.windows.server.sbs:149192
> | X-Tomcat-NG: microsoft.public.windows.server.sbs
> |
> | Hi Thomas,
> |
> | I have used the following script, however you need to make sure that you
> | have changed the printers to your printers, and I cannot guarantee this
> will
> | work:
> |
> | Note: Try this out on one or two stations before you make the changes to
> the
> | login script!
> |
> | copy the following into a text file in \\servername\netlogon\ and name it
> | "addprinter.vbs" (no quotes)
> |
> | <start copying below this line>
> |
> '==========================================================================
> | '
> | ' NAME: addprinter.vbs
> | '
> | ' AUTHOR: Mark D. MacLachlan, The Spider's Parlor; Modified by DV
> | ' URL : http://www.thespidersparlor.com; www.pcm.on.ca
> | ' DATE : April 13 2005
> |
> '==========================================================================
> |
> |
> | ON ERROR RESUME NEXT
> |
> | Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj,
> Path
> |
> |
> | Set WSHShell = CreateObject("WScript.Shell")
> | Set WSHNetwork = CreateObject("WScript.Network")
> | Set objDomain = getObject("LDAP://rootDse")
> | DomainString = objDomain.Get("dnsHostName")
> |
> | UserString = WSHNetwork.UserName
> | 'Bind to the user object to get user name and check for group memberships
> | later
> | Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
> |
> | ' Begin DV mods below:
> |
> | 'Remove a specific printer
> | 'WSHNetwork.RemovePrinterConnection "\\ServerOld\HP5si",True,True
> | '>>>DV: above line commented out, do not want to remove any, but may in
> the
> | future.
> | 'Install Printers
> | WSHNetwork.AddWindowsPrinterConnection "\\servername\PrinterOne"
> | WSHNetwork.AddWindowsPrinterConnection "\\servername\CopierBlk"
> |
> |
> | ' This section of script will prevent the baloon window that appears when
> | printing
> | ' to a network shared printer after XP Service Pack 2 is installed.
> | '=====================================
> |
> | Path = "HKCU\Printers\Settings\EnableBalloonNotificationsRemote"
> | WshShell.RegWrite Path, 0 ,"REG_DWORD"
> |
> | 'Clean Up Memory We Used
> | set UserObj = Nothing
> | set GroupObj = Nothing
> | set WSHNetwork = Nothing
> | set DomainString = Nothing
> | set WSHSHell = Nothing
> | Set WSHPrinters = Nothing
> |
> |
> | 'Quit the Script
> | wscript.quit
> |
> | <stop copying above this line>
> |
> | Thomas: be sure to replace "Servername" with your servername, and have
> the
> | printer(s) installed on the server. Use the sharename of the printer
> behind
> | the servername in
> | WSHNetwork.AddWindowsPrinterConnection "\\servername\PrinterOne"
> |
> | Test from a client pc:
> | (go to client, at a command prompt, type:
> | net use x: \\servername\netlogon (press enter)
> | cscript.exe x:\addprinter.vbs (press enter)
> |
> | (The printer should be installed, if you have the proper names in place
> of
> | "servername", PrinterOne, CopierBlk, etc)
> |
> | When you are sure this is working from a few different clients (XP,
> 2000),
> | add the following line to the login script:
> | cscript.exe \\servername\netlogon\addprinter.vbs
> |
> | (remember to change the servername!)
> |
> |
> |
> | --
> | - Dave
> |
> |
> | "Thomas" wrote:
> |
> | > How can I set it up so when users log on a printer is automatically
> installed
> | > on the computer. I am trying to avoid walking around to 20 workstaions
> and
> | > installing a printer manually.
> | >
> | > thanks
> |
.
- Follow-Ups:
- Re: Printer Install
- From: "Charles Yang [MSFT]"
- Re: Printer Install
- Prev by Date: RSM cannot manage library Tape0. The database is corrupt.
- Next by Date: Re: Problems resolving FQDN in Outlook on SBS 2K3
- Previous by thread: RSM cannot manage library Tape0. The database is corrupt.
- Next by thread: Re: Printer Install
- Index(es):
Relevant Pages
|
Loading