<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Set default printer from a script</title>
	<atom:link href="http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/</link>
	<description>Windows Network Administration Software</description>
	<lastBuildDate>Fri, 10 Feb 2012 16:32:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: Karthik</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-3750</link>
		<dc:creator>Karthik</dc:creator>
		<pubDate>Tue, 13 Sep 2011 19:58:03 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-3750</guid>
		<description>i am using this script, but it is unable to set it to default. The printer name is as follows :K2Printer2Backup on http://abc.def.abdc.edu:631
code as follows:
Set WSHNetwork = CreateObject(&quot;Wscript.Network&quot;)
WSHNetwork.SetDefaultPrinter &quot;\\K2Printer2Backup on http://abc.def.abdc.edu:631
&quot;</description>
		<content:encoded><![CDATA[<p>i am using this script, but it is unable to set it to default. The printer name is as follows :K2Printer2Backup on <a href="http://abc.def.abdc.edu:631" rel="nofollow">http://abc.def.abdc.edu:631</a><br />
code as follows:<br />
Set WSHNetwork = CreateObject(&#8220;Wscript.Network&#8221;)<br />
WSHNetwork.SetDefaultPrinter &#8220;\\K2Printer2Backup on <a href="http://abc.def.abdc.edu:631" rel="nofollow">http://abc.def.abdc.edu:631</a><br />
&#8220;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johan M</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-1018</link>
		<dc:creator>Johan M</dc:creator>
		<pubDate>Sat, 11 Sep 2010 07:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-1018</guid>
		<description>I reduced the logon script to just this line:
Cscript \\pdcserver\sysvol\ourdomain.local\scripts\AddPrinter.vbs

When I run the script (Win 2008 R2), I get a Syntax error 800A03EA, first line, 9th character.
Any ideas?
Do I have to include the &quot;.local&quot;?</description>
		<content:encoded><![CDATA[<p>I reduced the logon script to just this line:<br />
Cscript \\pdcserver\sysvol\ourdomain.local\scripts\AddPrinter.vbs</p>
<p>When I run the script (Win 2008 R2), I get a Syntax error 800A03EA, first line, 9th character.<br />
Any ideas?<br />
Do I have to include the &#8220;.local&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trev</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-919</link>
		<dc:creator>Trev</dc:creator>
		<pubDate>Thu, 12 Aug 2010 08:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-919</guid>
		<description>reference my previous comments..
After some additional research I have noted that you can not disable the UAC on the fly
I will have to look at getting the script run as ADMIN some how.
if anyone has any additional thoughts... please post.
PS: my script takes a 3 digit entry and uses that to create the 2 and 3 octect of an IP to generate the ip addy of the printer.
The driver make and model is pre defined in the script so it looks in the printer repository fromt eh printer driver. if it cant find it it downloads the driver from the F&amp;P server and begins the install... names the printer and logs the event inc. time dates and signed on user.</description>
		<content:encoded><![CDATA[<p>reference my previous comments..<br />
After some additional research I have noted that you can not disable the UAC on the fly<br />
I will have to look at getting the script run as ADMIN some how.<br />
if anyone has any additional thoughts&#8230; please post.<br />
PS: my script takes a 3 digit entry and uses that to create the 2 and 3 octect of an IP to generate the ip addy of the printer.<br />
The driver make and model is pre defined in the script so it looks in the printer repository fromt eh printer driver. if it cant find it it downloads the driver from the F&amp;P server and begins the install&#8230; names the printer and logs the event inc. time dates and signed on user.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trev</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-916</link>
		<dc:creator>Trev</dc:creator>
		<pubDate>Wed, 11 Aug 2010 12:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-916</guid>
		<description>Can you advise on the syntax for Windows 7 due to the UAC restrictions my Pre-Win 7 script doesnt work. any thought on getting this to run as admin with out hard coding the admin user s password??</description>
		<content:encoded><![CDATA[<p>Can you advise on the syntax for Windows 7 due to the UAC restrictions my Pre-Win 7 script doesnt work. any thought on getting this to run as admin with out hard coding the admin user s password??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Wiseman</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-684</link>
		<dc:creator>Steve Wiseman</dc:creator>
		<pubDate>Tue, 22 Jun 2010 17:36:17 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-684</guid>
		<description>Thanks for the post. Really appreciated. I have updated your code so it has WSHNetwork for the objects.</description>
		<content:encoded><![CDATA[<p>Thanks for the post. Really appreciated. I have updated your code so it has WSHNetwork for the objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve K.</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-683</link>
		<dc:creator>Steve K.</dc:creator>
		<pubDate>Tue, 22 Jun 2010 16:55:15 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-683</guid>
		<description>I&#039;m sorry, objNetwork should be WSHNetwork, I don&#039;t normally use WSH network but I was trying to make it as close to your script as possible.</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry, objNetwork should be WSHNetwork, I don&#8217;t normally use WSH network but I was trying to make it as close to your script as possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve K.</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-682</link>
		<dc:creator>Steve K.</dc:creator>
		<pubDate>Tue, 22 Jun 2010 16:53:59 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-682</guid>
		<description>There&#039;s some other items to consider for that network printer. This should be the full blown script if you were to have users in a multi-server environment. I don&#039;t see success in using that script for a multi-server environment.

Batch Script
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~
@ECHO OFF
::Replace CompanyName With your company&#039;s real name
TITLE COMPANYNAME LOGON SCRIPT
:: echo off will hide the actions of the logon scripts
:: and allow you to leave a message of your own.
ECHO. ADDING PRINTER
Cscript \\serverdc\sysvol\domain.com\scripts\AddPrinter.vbs
ECHO. PERFORMING OTHER ACTIONS
::Add additional commands here.
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~
You can remove all of the lines that use ::, they are just notes for anyone using the script.

AddPrinter.vbs
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~
Set WSHNetwork = CreateObject(&quot;WScript.Network&quot;)
WSHNetwork.AddWindowsPrinterConnection &quot;\\serverdc\HP Color LaserJet 4500&quot;
WSHNetwork.SetDefaultPrinter &quot;\\serverdc\HP Color LaserJet 4500&quot;
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~

Store them in this location:
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~
\\ServerDC\netlogon
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~
The local drive location on the domain controller is C:\Windows \ Sysvol \ Sysvol \ Domain.com \ Scripts


Group Policy Deployment
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~
User Configuration \  Windows Settings \ Scripts (Logon/Logoff) \ Logon
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~
Open Logon properties, add \\serverdc\netlogon

Obviously replace serverdc with your own real Domain Controller in your business throughout all of the steps here.</description>
		<content:encoded><![CDATA[<p>There&#8217;s some other items to consider for that network printer. This should be the full blown script if you were to have users in a multi-server environment. I don&#8217;t see success in using that script for a multi-server environment.</p>
<p>Batch Script<br />
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~<br />
@ECHO OFF<br />
::Replace CompanyName With your company&#8217;s real name<br />
TITLE COMPANYNAME LOGON SCRIPT<br />
:: echo off will hide the actions of the logon scripts<br />
:: and allow you to leave a message of your own.<br />
ECHO. ADDING PRINTER<br />
Cscript \\serverdc\sysvol\domain.com\scripts\AddPrinter.vbs<br />
ECHO. PERFORMING OTHER ACTIONS<br />
::Add additional commands here.<br />
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~<br />
You can remove all of the lines that use ::, they are just notes for anyone using the script.</p>
<p>AddPrinter.vbs<br />
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~<br />
Set WSHNetwork = CreateObject(&#8220;WScript.Network&#8221;)<br />
WSHNetwork.AddWindowsPrinterConnection &#8220;\\serverdc\HP Color LaserJet 4500&#8243;<br />
WSHNetwork.SetDefaultPrinter &#8220;\\serverdc\HP Color LaserJet 4500&#8243;<br />
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~</p>
<p>Store them in this location:<br />
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~<br />
\\ServerDC\netlogon<br />
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~<br />
The local drive location on the domain controller is C:\Windows \ Sysvol \ Sysvol \ Domain.com \ Scripts</p>
<p>Group Policy Deployment<br />
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~<br />
User Configuration \  Windows Settings \ Scripts (Logon/Logoff) \ Logon<br />
~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~<br />
Open Logon properties, add \\serverdc\netlogon</p>
<p>Obviously replace serverdc with your own real Domain Controller in your business throughout all of the steps here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Wiseman</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-144</link>
		<dc:creator>Steve Wiseman</dc:creator>
		<pubDate>Tue, 16 Feb 2010 16:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-144</guid>
		<description>You have a typo WSHNetork should be WSHNetwork</description>
		<content:encoded><![CDATA[<p>You have a typo WSHNetork should be WSHNetwork</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-143</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Tue, 16 Feb 2010 15:58:52 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-143</guid>
		<description>Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

c:\dp2.vbs(2, 1) Microsoft VBScript runtime error: Object required: &#039;WSHNetork&#039;

Help!

Thank You</description>
		<content:encoded><![CDATA[<p>Microsoft (R) Windows Script Host Version 5.7<br />
Copyright (C) Microsoft Corporation. All rights reserved.</p>
<p>c:\dp2.vbs(2, 1) Microsoft VBScript runtime error: Object required: &#8216;WSHNetork&#8217;</p>
<p>Help!</p>
<p>Thank You</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Wiseman</title>
		<link>http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script/comment-page-1/#comment-142</link>
		<dc:creator>Steve Wiseman</dc:creator>
		<pubDate>Wed, 27 Jan 2010 20:56:17 +0000</pubDate>
		<guid isPermaLink="false">http://intelliadmin.wordpress.com/2007/08/09/set-default-printer-from-a-script/#comment-142</guid>
		<description>This is from the blogging software we use here. You will need to erase the quotes and re-write them yourself...the quotes in the blog are a special kind that are not recognized by the script engine.</description>
		<content:encoded><![CDATA[<p>This is from the blogging software we use here. You will need to erase the quotes and re-write them yourself&#8230;the quotes in the blog are a special kind that are not recognized by the script engine.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

