﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Migrate Network Printers the easy way - PrintSwap</title><link>http://www.visualbasicscript.com/</link><description /><copyright>(c) VBScript Forum</copyright><ttl>30</ttl><item><title> RE: Migrate Network Printers the easy way - PrintSwap (edavis6678)</title><description>  (I neglected to post that I found that check box) -- sometimes I get a bit anxious for a fix. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  Thanks for the reply though! &lt;br&gt;  &amp;nbsp; &lt;br&gt;  -E &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=49418</link><pubDate>Thu, 12 Jul 2007 09:37:19 GMT</pubDate></item><item><title> RE: Migrate Network Printers the easy way - PrintSwap (andreas)</title><description>  &lt;blockquote class="quote"&gt;&lt;i&gt;&lt;/i&gt;&lt;br&gt;ORIGINAL:  edavis6678 &lt;br&gt;   &lt;br&gt;  ok..slightly &lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s7.gif" alt="" /&gt;, but related to migrating printers. &lt;br&gt;   &lt;br&gt;  I'm keepign the old server up for about a week as the script runs through the flipping of users...however I want to watch the old server for printing - in case someoen is still printing to the old server.&amp;nbsp;  &lt;br&gt;   &lt;br&gt;  I've written a script that monitors a windows server for SYSTEM log Event ID #10), &amp;nbsp;however on this old server there are no event ID 10.&amp;nbsp; (it seems someone must have turned it off). - i know this cause the new server I built HAS event ID 10's. &lt;br&gt;   &lt;br&gt;  Anyone know how to turn that off/on?&amp;nbsp; (I'd like to eventually turn it off the new server cause I dot'n want tthat spamming theh event log) &lt;br&gt;   &lt;br&gt;  Thanks &lt;br&gt;   &lt;br&gt;  -E  &lt;br&gt;   &lt;br&gt;  PS EVent ID 10 is written to the system event log when someone prints. &lt;br&gt;  &lt;/blockquote&gt; &lt;br&gt;   &lt;br&gt;  Check the Print server properties for the following flag (checkbox option) &lt;br&gt;  "log spooler information events" &lt;br&gt;  and &lt;br&gt;  "Notify when remote documents are printed" &lt;br&gt;   &lt;br&gt;  Cheers &lt;br&gt;   &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=49379</link><pubDate>Thu, 12 Jul 2007 01:23:18 GMT</pubDate></item><item><title> RE: Migrate Network Printers the easy way - PrintSwap (edavis6678)</title><description>  ok..slightly &lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s7.gif" alt="" /&gt;, but related to migrating printers. &lt;br&gt;   &lt;br&gt;  I'm keepign the old server up for about a week as the script runs through the flipping of users...however I want to watch the old server for printing - in case someoen is still printing to the old server.&amp;nbsp;  &lt;br&gt;   &lt;br&gt;  I've written a script that monitors a windows server for SYSTEM log Event ID #10), &amp;nbsp;however on this old server there are no event ID 10.&amp;nbsp; (it seems someone must have turned it off). - i know this cause the new server I built HAS event ID 10's. &lt;br&gt;   &lt;br&gt;  Anyone know how to turn that off/on?&amp;nbsp; (I'd like to eventually turn it off the new server cause I dot'n want tthat spamming theh event log) &lt;br&gt;   &lt;br&gt;  Thanks &lt;br&gt;   &lt;br&gt;  -E  &lt;br&gt;  &amp;nbsp; &lt;br&gt;  PS EVent ID 10 is written to the system event log when someone prints. &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=48863</link><pubDate>Thu, 28 Jun 2007 12:12:11 GMT</pubDate></item><item><title> RE: Migrate Network Printers the easy way - PrintSwap (ebgreen)</title><description>  [sarcasm] Sure it is... [/sarcasm] </description><link>http://www.visualbasicscript.com/fb.ashx?m=48861</link><pubDate>Thu, 28 Jun 2007 11:32:31 GMT</pubDate></item><item><title> RE: Migrate Network Printers the easy way - PrintSwap (edavis6678)</title><description>  hehe. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  I'm doing major printer mig at my new job.&amp;nbsp;x32 to x64 clusters...had to dig my old mig script out&amp;nbsp; ;)...figured I'd post and share. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  Looks like printer deployment is getting easier though with R2... &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &amp;nbsp; &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=48858</link><pubDate>Thu, 28 Jun 2007 10:23:34 GMT</pubDate></item><item><title> RE: Migrate Network Printers the easy way - PrintSwap (ebgreen)</title><description>  I have one too. &lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s6.gif" alt="" /&gt; </description><link>http://www.visualbasicscript.com/fb.ashx?m=48852</link><pubDate>Thu, 28 Jun 2007 08:59:14 GMT</pubDate></item><item><title> RE: Migrate Network Printers the easy way - PrintSwap (dm_4ever)</title><description>  How weird...I just wrote one to do the same thing for someone at work. </description><link>http://www.visualbasicscript.com/fb.ashx?m=48821</link><pubDate>Wed, 27 Jun 2007 18:28:06 GMT</pubDate></item><item><title> Migrate Network Printers the easy way - PrintSwap (edavis6678)</title><description>  Here's a real simple script if you are in the process of migrating from 1 windows printer server to another.&amp;nbsp; (or if you ever want to migrate from 1 printer share to a new printer share) &lt;br&gt;   &lt;br&gt;  Run this as part of a login script, or interactively. &lt;br&gt;   &lt;br&gt;  Rememeber to change line 7 of the script to note the name of your INPUT file.&amp;nbsp; Format of file is simple TXT file, (i use CSV extension so you can modify in excel).&amp;nbsp; Make sure input file is in same directory as script. &lt;br&gt;   &lt;br&gt;  Format is as follows: &lt;br&gt;   &lt;br&gt;  \\OLDSERVERNAME\OLDPRINTERSHARENAME, \\NEWSERVERNAME\NEWSHARENAME &lt;br&gt;  \\SERVERNAME\OLDPRINTERSHARENAME, \\SERVERNAME\NEWSHARENAME &lt;br&gt;   &lt;br&gt;  Enjoy &lt;br&gt;   &lt;br&gt;  -E &lt;br&gt;   &lt;br&gt;  &lt;pre class="prettyprint"&gt;
 
 On Error Resume Next
 ' PrintSwap vbs - Author, Eric Davis- edavis6678 -at- Y a h o o . com
 Dim oNetwork, oFso, oShell, InputFileName
 Set oShell&amp;nbsp;&amp;nbsp; = WScript.CreateObject("WScript.Shell")
 Set oNetwork = WScript.CreateObject("WScript.Network")
 Set oFso= CreateObject("Scripting.FileSystemObject")
 InputFileName = "redirect_list.csv" ' Make sure this files is located in SAME directory as this script
 'Format of files is as follows
 '\\OLDSERVERNAME\OLDPRINTERSHARENAME, \\NEWSERVERNAME\NEWSHARENAME
 '\\SERVERNAME\OLDPRINTERSHARENAME, \\SERVERNAME\NEWSHARENAME
 Set oPrinters = oNetwork.EnumPrinterConnections
 For i = 0 to oPrinters.Count - 1 Step 2
 Print = oPrinters.Item(i)
 PrintDev = oPrinters.Item(i+1)
 '########## CALL TO CHECK PRINTERS AND CHANGE IF NECESSARY
 Call ReMapPrinter(PrintDev) 
 Next
 'End of Script
 Sub ReMapPrinter(OldPrinter)
 booldontadd = 0
 sScriptDir = Left(WScript.ScriptFullName, Len(WScript.ScriptFullName) - Len(WScript.ScriptName)) ' Path of script
 InputFile = sScriptDir &amp;amp; "\" &amp;amp; InputFileName ' path of inputfile
 Set TempFile = ofso.openTextFile(InputFile) ' read through file
 While Not TempFile.atendofstream
 &amp;nbsp;TextLine = Trim(TempFile.Readline)
 &amp;nbsp;aryLine = Split(TextLine,",")
 &amp;nbsp;printerpath = lcase(aryLine(1))
 &amp;nbsp;If printerpath = "" Then ' If printer is listed, but no value given for new printer then just remove old printer
 &amp;nbsp;&amp;nbsp;booldontadd = 1
 &amp;nbsp;Else
 &amp;nbsp;&amp;nbsp;booldontadd = 0
 &amp;nbsp;End If
 &amp;nbsp;oldprinterpath = lcase(aryLine(0))
 &amp;nbsp;If lcase(OldPrinter) = oldprinterPath Then
 &amp;nbsp;&amp;nbsp;' get current default printer
 &amp;nbsp;&amp;nbsp;DefaultKey = LCase(oShell.RegRead("HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device"))
 &amp;nbsp;&amp;nbsp;DefPrinter = Split(DefaultKey, ",")
 &amp;nbsp;&amp;nbsp;If booldontadd = 0 Then ' must have new target, if none, printer removed.
 &amp;nbsp;&amp;nbsp;&amp;nbsp;oNetwork.AddWindowsPrinterConnection printerpath
 &amp;nbsp;&amp;nbsp;End If
 &amp;nbsp;&amp;nbsp;oNetwork.RemovePrinterConnection oldprinterPath ' remove old printer
 &amp;nbsp;&amp;nbsp;&amp;nbsp;If DefPrinter(0) = oldprinterpath Then 
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oNetwork.SetDefaultPrinter PrinterPath ' if it was the default, reset it back to default
 &amp;nbsp;&amp;nbsp;&amp;nbsp;End If
 &amp;nbsp;End If
 Wend
 End Sub
 
 &lt;/pre&gt; </description><link>http://www.visualbasicscript.com/fb.ashx?m=48808</link><pubDate>Wed, 27 Jun 2007 11:42:31 GMT</pubDate></item></channel></rss>
