AutoIt Forums: Backup Printer settings - AutoIt Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Backup Printer settings

#1 User is offline   Doppio 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 126
  • Joined: 29-December 05

Posted 05 January 2006 - 09:11 PM

I'm working on a backup script, Is there a way to backup the printer settings for the local PC?
After reinstalling windows, I want to be able to restore favorites, documents, and printer settigns.

#2 User is offline   cameronsdad 

  • Mass Spammer!
  • PipPipPipPipPipPipPip
  • Group: Full Members
  • Posts: 2,556
  • Joined: 22-June 05
  • Location:Las Vegas

Posted 05 January 2006 - 09:17 PM

View Postguayo, on Jan 5 2006, 12:11 PM, said:

I'm working on a backup script, Is there a way to backup the printer settings for the local PC?
After reinstalling windows, I want to be able to restore favorites, documents, and printer settigns.

you could copy the printer setting from the registry, but you'll still need to install the printer with drivers etc after a reinstall. the easiest way to accomplish the desired end result would be to just make a script that adds new printer, then sets the settings that you want, and installs drivers etc.

#3 User is offline   MikeOsdx 

  • Never trust a Monkey
  • PipPipPipPip
  • Group: Full Members
  • Posts: 529
  • Joined: 12-April 04
  • Location:New York

Posted 05 January 2006 - 09:56 PM

I just wrote a script to add a printer using AutoIT Beta with COM.

Check it out HERE

This may not be exactly what you need but if you need any help converting it for your use let me know.

Mike

#4 User is offline   DaveF 

  • Smells fanboyish.
  • Icon
  • Group: Developers(Dev)
  • Posts: 637
  • Joined: 28-May 04
  • Location:Arkansas, USA

Posted 05 January 2006 - 10:14 PM

The PrnAdmin tool in the Windows Resource Kit has a COM component and (VBScript) scripts for doing just this; backup, restore, duplication. I've used it in the past and it worked great.

#5 User is offline   Doppio 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 126
  • Joined: 29-December 05

Posted 05 January 2006 - 10:18 PM

View PostMikeOsdx, on Jan 5 2006, 03:56 PM, said:

I just wrote a script to add a printer using AutoIT Beta with COM.

Check it out HERE

This may not be exactly what you need but if you need any help converting it for your use let me know.

Mike


Thank you Both, I'f I can't backup the settings, can I at least backup the local printer list, so that I know what printers were connected on a PC.
Thank you.

#6 User is offline   MikeOsdx 

  • Never trust a Monkey
  • PipPipPipPip
  • Group: Full Members
  • Posts: 529
  • Joined: 12-April 04
  • Location:New York

Posted 05 January 2006 - 10:35 PM

Yes you can get just about any information you want about the currently installed printers. Using the ScriptOMatic.au3 I got the script below which will tell you everything you could possibly want to know about your printers. I would suggest trimming those Items you don't need or want.

NOTE: You must be using the AutoIT Beta version for COM support.

[ code='text' ]    ( ExpandCollapse - Popup )
; Generated by AutoIt Scriptomatic $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $Output="" $Output = $Output & "Computer: " & $strComputer  & @CRLF $Output = $Output & "==========================================" & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Printer", "WQL", _                                           $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then    For $objItem In $colItems       $Output = $Output & "Attributes: " & $objItem.Attributes & @CRLF       $Output = $Output & "Availability: " & $objItem.Availability & @CRLF       $strAvailableJobSheets = $objItem.AvailableJobSheets(0)       $Output = $Output & "AvailableJobSheets: " & $strAvailableJobSheets & @CRLF       $Output = $Output & "AveragePagesPerMinute: " & $objItem.AveragePagesPerMinute & @CRLF       $strCapabilities = $objItem.Capabilities(0)       $Output = $Output & "Capabilities: " & $strCapabilities & @CRLF       $strCapabilityDescriptions = $objItem.CapabilityDescriptions(0)       $Output = $Output & "CapabilityDescriptions: " & $strCapabilityDescriptions & @CRLF       $Output = $Output & "Caption: " & $objItem.Caption & @CRLF       $strCharSetsSupported = $objItem.CharSetsSupported(0)       $Output = $Output & "CharSetsSupported: " & $strCharSetsSupported & @CRLF       $Output = $Output & "Comment: " & $objItem.Comment & @CRLF       $Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF       $Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF       $Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF       $strCurrentCapabilities = $objItem.CurrentCapabilities(0)       $Output = $Output & "CurrentCapabilities: " & $strCurrentCapabilities & @CRLF       $Output = $Output & "CurrentCharSet: " & $objItem.CurrentCharSet & @CRLF       $Output = $Output & "CurrentLanguage: " & $objItem.CurrentLanguage & @CRLF       $Output = $Output & "CurrentMimeType: " & $objItem.CurrentMimeType & @CRLF       $Output = $Output & "CurrentNaturalLanguage: " & $objItem.CurrentNaturalLanguage & @CRLF       $Output = $Output & "CurrentPaperType: " & $objItem.CurrentPaperType & @CRLF       $Output = $Output & "Default: " & $objItem.Default & @CRLF       $strDefaultCapabilities = $objItem.DefaultCapabilities(0)       $Output = $Output & "DefaultCapabilities: " & $strDefaultCapabilities & @CRLF       $Output = $Output & "DefaultCopies: " & $objItem.DefaultCopies & @CRLF       $Output = $Output & "DefaultLanguage: " & $objItem.DefaultLanguage & @CRLF       $Output = $Output & "DefaultMimeType: " & $objItem.DefaultMimeType & @CRLF       $Output = $Output & "DefaultNumberUp: " & $objItem.DefaultNumberUp & @CRLF       $Output = $Output & "DefaultPaperType: " & $objItem.DefaultPaperType & @CRLF       $Output = $Output & "DefaultPriority: " & $objItem.DefaultPriority & @CRLF       $Output = $Output & "Description: " & $objItem.Description & @CRLF       $Output = $Output & "DetectedErrorState: " & $objItem.DetectedErrorState & @CRLF       $Output = $Output & "DeviceID: " & $objItem.DeviceID & @CRLF       $Output = $Output & "Direct: " & $objItem.Direct & @CRLF       $Output = $Output & "DoCompleteFirst: " & $objItem.DoCompleteFirst & @CRLF       $Output = $Output & "DriverName: " & $objItem.DriverName & @CRLF       $Output = $Output & "EnableBIDI: " & $objItem.EnableBIDI & @CRLF       $Output = $Output & "EnableDevQueryPrint: " & $objItem.EnableDevQueryPrint & @CRLF       $Output = $Output & "ErrorCleared: " & $objItem.ErrorCleared & @CRLF       $Output = $Output & "ErrorDescription: " & $objItem.ErrorDescription & @CRLF       $strErrorInformation = $objItem.ErrorInformation(0)       $Output = $Output & "ErrorInformation: " & $strErrorInformation & @CRLF       $Output = $Output & "ExtendedDetectedErrorState: " & $objItem.ExtendedDetectedErrorState & @CRLF       $Output = $Output & "ExtendedPrinterStatus: " & $objItem.ExtendedPrinterStatus & @CRLF       $Output = $Output & "Hidden: " & $objItem.Hidden & @CRLF       $Output = $Output & "HorizontalResolution: " & $objItem.HorizontalResolution & @CRLF       $Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF       $Output = $Output & "JobCountSinceLastReset: " & $objItem.JobCountSinceLastReset & @CRLF       $Output = $Output & "KeepPrintedJobs: " & $objItem.KeepPrintedJobs & @CRLF       $strLanguagesSupported = $objItem.LanguagesSupported(0)       $Output = $Output & "LanguagesSupported: " & $strLanguagesSupported & @CRLF       $Output = $Output & "LastErrorCode: " & $objItem.LastErrorCode & @CRLF       $Output = $Output & "Local: " & $objItem.Local & @CRLF       $Output = $Output & "Location: " & $objItem.Location & @CRLF       $Output = $Output & "MarkingTechnology: " & $objItem.MarkingTechnology & @CRLF       $Output = $Output & "MaxCopies: " & $objItem.MaxCopies & @CRLF       $Output = $Output & "MaxNumberUp: " & $objItem.MaxNumberUp & @CRLF       $Output = $Output & "MaxSizeSupported: " & $objItem.MaxSizeSupported & @CRLF       $strMimeTypesSupported = $objItem.MimeTypesSupported(0)       $Output = $Output & "MimeTypesSupported: " & $strMimeTypesSupported & @CRLF       $Output = $Output & "Name: " & $objItem.Name & @CRLF       $strNaturalLanguagesSupported = $objItem.NaturalLanguagesSupported(0)       $Output = $Output & "NaturalLanguagesSupported: " & $strNaturalLanguagesSupported & @CRLF       $Output = $Output & "Network: " & $objItem.Network & @CRLF       $strPaperSizesSupported = $objItem.PaperSizesSupported(0)       $Output = $Output & "PaperSizesSupported: " & $strPaperSizesSupported & @CRLF       $strPaperTypesAvailable = $objItem.PaperTypesAvailable(0)       $Output = $Output & "PaperTypesAvailable: " & $strPaperTypesAvailable & @CRLF       $Output = $Output & "Parameters: " & $objItem.Parameters & @CRLF       $Output = $Output & "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF       $Output = $Output & "PortName: " & $objItem.PortName & @CRLF       $strPowerManagementCapabilities = $objItem.PowerManagementCapabilities(0)       $Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF       $Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF       $strPrinterPaperNames = $objItem.PrinterPaperNames(0)       $Output = $Output & "PrinterPaperNames: " & $strPrinterPaperNames & @CRLF       $Output = $Output & "PrinterState: " & $objItem.PrinterState & @CRLF       $Output = $Output & "PrinterStatus: " & $objItem.PrinterStatus & @CRLF       $Output = $Output & "PrintJobDataType: " & $objItem.PrintJobDataType & @CRLF       $Output = $Output & "PrintProcessor: " & $objItem.PrintProcessor & @CRLF       $Output = $Output & "Priority: " & $objItem.Priority & @CRLF       $Output = $Output & "Published: " & $objItem.Published & @CRLF       $Output = $Output & "Queued: " & $objItem.Queued & @CRLF       $Output = $Output & "RawOnly: " & $objItem.RawOnly & @CRLF       $Output = $Output & "SeparatorFile: " & $objItem.SeparatorFile & @CRLF       $Output = $Output & "ServerName: " & $objItem.ServerName & @CRLF       $Output = $Output & "Shared: " & $objItem.Shared & @CRLF       $Output = $Output & "ShareName: " & $objItem.ShareName & @CRLF       $Output = $Output & "SpoolEnabled: " & $objItem.SpoolEnabled & @CRLF       $Output = $Output & "StartTime: " & WMIDateStringToDate($objItem.StartTime) & @CRLF       $Output = $Output & "Status: " & $objItem.Status & @CRLF       $Output = $Output & "StatusInfo: " & $objItem.StatusInfo & @CRLF       $Output = $Output & "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF       $Output = $Output & "SystemName: " & $objItem.SystemName & @CRLF       $Output = $Output & "TimeOfLastReset: " & WMIDateStringToDate($objItem.TimeOfLastReset) & @CRLF       $Output = $Output & "UntilTime: " & WMIDateStringToDate($objItem.UntilTime) & @CRLF       $Output = $Output & "VerticalResolution: " & $objItem.VerticalResolution & @CRLF       $Output = $Output & "WorkOffline: " & $objItem.WorkOffline & @CRLF       if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop       $Output=""    Next Else    Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_Printer" ) Endif Func WMIDateStringToDate($dtmDate)     Return (StringMid($dtmDate, 5, 2) & "/" & _     StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _     & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2)) EndFunc


#7 User is offline   Doppio 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 126
  • Joined: 29-December 05

Posted 05 January 2006 - 11:06 PM

View PostMikeOsdx, on Jan 5 2006, 04:35 PM, said:

Yes you can get just about any information you want about the currently installed printers. Using the ScriptOMatic.au3 I got the script below which will tell you everything you could possibly want to know about your printers. I would suggest trimming those Items you don't need or want.

NOTE: You must be using the AutoIT Beta version for COM support.

[ code='text' ]    ( ExpandCollapse - Popup )
; Generated by AutoIt Scriptomatic $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $Output="" $Output = $Output & "Computer: " & $strComputer  & @CRLF $Output = $Output & "==========================================" & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Printer", "WQL", _                                           $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then    For $objItem In $colItems       $Output = $Output & "Attributes: " & $objItem.Attributes & @CRLF       $Output = $Output & "Availability: " & $objItem.Availability & @CRLF       $strAvailableJobSheets = $objItem.AvailableJobSheets(0)       $Output = $Output & "AvailableJobSheets: " & $strAvailableJobSheets & @CRLF       $Output = $Output & "AveragePagesPerMinute: " & $objItem.AveragePagesPerMinute & @CRLF       $strCapabilities = $objItem.Capabilities(0)       $Output = $Output & "Capabilities: " & $strCapabilities & @CRLF       $strCapabilityDescriptions = $objItem.CapabilityDescriptions(0)       $Output = $Output & "CapabilityDescriptions: " & $strCapabilityDescriptions & @CRLF       $Output = $Output & "Caption: " & $objItem.Caption & @CRLF       $strCharSetsSupported = $objItem.CharSetsSupported(0)       $Output = $Output & "CharSetsSupported: " & $strCharSetsSupported & @CRLF       $Output = $Output & "Comment: " & $objItem.Comment & @CRLF       $Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF       $Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF       $Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF       $strCurrentCapabilities = $objItem.CurrentCapabilities(0)       $Output = $Output & "CurrentCapabilities: " & $strCurrentCapabilities & @CRLF       $Output = $Output & "CurrentCharSet: " & $objItem.CurrentCharSet & @CRLF       $Output = $Output & "CurrentLanguage: " & $objItem.CurrentLanguage & @CRLF       $Output = $Output & "CurrentMimeType: " & $objItem.CurrentMimeType & @CRLF       $Output = $Output & "CurrentNaturalLanguage: " & $objItem.CurrentNaturalLanguage & @CRLF       $Output = $Output & "CurrentPaperType: " & $objItem.CurrentPaperType & @CRLF       $Output = $Output & "Default: " & $objItem.Default & @CRLF       $strDefaultCapabilities = $objItem.DefaultCapabilities(0)       $Output = $Output & "DefaultCapabilities: " & $strDefaultCapabilities & @CRLF       $Output = $Output & "DefaultCopies: " & $objItem.DefaultCopies & @CRLF       $Output = $Output & "DefaultLanguage: " & $objItem.DefaultLanguage & @CRLF       $Output = $Output & "DefaultMimeType: " & $objItem.DefaultMimeType & @CRLF       $Output = $Output & "DefaultNumberUp: " & $objItem.DefaultNumberUp & @CRLF       $Output = $Output & "DefaultPaperType: " & $objItem.DefaultPaperType & @CRLF       $Output = $Output & "DefaultPriority: " & $objItem.DefaultPriority & @CRLF       $Output = $Output & "Description: " & $objItem.Description & @CRLF       $Output = $Output & "DetectedErrorState: " & $objItem.DetectedErrorState & @CRLF       $Output = $Output & "DeviceID: " & $objItem.DeviceID & @CRLF       $Output = $Output & "Direct: " & $objItem.Direct & @CRLF       $Output = $Output & "DoCompleteFirst: " & $objItem.DoCompleteFirst & @CRLF       $Output = $Output & "DriverName: " & $objItem.DriverName & @CRLF       $Output = $Output & "EnableBIDI: " & $objItem.EnableBIDI & @CRLF       $Output = $Output & "EnableDevQueryPrint: " & $objItem.EnableDevQueryPrint & @CRLF       $Output = $Output & "ErrorCleared: " & $objItem.ErrorCleared & @CRLF       $Output = $Output & "ErrorDescription: " & $objItem.ErrorDescription & @CRLF       $strErrorInformation = $objItem.ErrorInformation(0)       $Output = $Output & "ErrorInformation: " & $strErrorInformation & @CRLF       $Output = $Output & "ExtendedDetectedErrorState: " & $objItem.ExtendedDetectedErrorState & @CRLF       $Output = $Output & "ExtendedPrinterStatus: " & $objItem.ExtendedPrinterStatus & @CRLF       $Output = $Output & "Hidden: " & $objItem.Hidden & @CRLF       $Output = $Output & "HorizontalResolution: " & $objItem.HorizontalResolution & @CRLF       $Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF       $Output = $Output & "JobCountSinceLastReset: " & $objItem.JobCountSinceLastReset & @CRLF       $Output = $Output & "KeepPrintedJobs: " & $objItem.KeepPrintedJobs & @CRLF       $strLanguagesSupported = $objItem.LanguagesSupported(0)       $Output = $Output & "LanguagesSupported: " & $strLanguagesSupported & @CRLF       $Output = $Output & "LastErrorCode: " & $objItem.LastErrorCode & @CRLF       $Output = $Output & "Local: " & $objItem.Local & @CRLF       $Output = $Output & "Location: " & $objItem.Location & @CRLF       $Output = $Output & "MarkingTechnology: " & $objItem.MarkingTechnology & @CRLF       $Output = $Output & "MaxCopies: " & $objItem.MaxCopies & @CRLF       $Output = $Output & "MaxNumberUp: " & $objItem.MaxNumberUp & @CRLF       $Output = $Output & "MaxSizeSupported: " & $objItem.MaxSizeSupported & @CRLF       $strMimeTypesSupported = $objItem.MimeTypesSupported(0)       $Output = $Output & "MimeTypesSupported: " & $strMimeTypesSupported & @CRLF       $Output = $Output & "Name: " & $objItem.Name & @CRLF       $strNaturalLanguagesSupported = $objItem.NaturalLanguagesSupported(0)       $Output = $Output & "NaturalLanguagesSupported: " & $strNaturalLanguagesSupported & @CRLF       $Output = $Output & "Network: " & $objItem.Network & @CRLF       $strPaperSizesSupported = $objItem.PaperSizesSupported(0)       $Output = $Output & "PaperSizesSupported: " & $strPaperSizesSupported & @CRLF       $strPaperTypesAvailable = $objItem.PaperTypesAvailable(0)       $Output = $Output & "PaperTypesAvailable: " & $strPaperTypesAvailable & @CRLF       $Output = $Output & "Parameters: " & $objItem.Parameters & @CRLF       $Output = $Output & "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF       $Output = $Output & "PortName: " & $objItem.PortName & @CRLF       $strPowerManagementCapabilities = $objItem.PowerManagementCapabilities(0)       $Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF       $Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF       $strPrinterPaperNames = $objItem.PrinterPaperNames(0)       $Output = $Output & "PrinterPaperNames: " & $strPrinterPaperNames & @CRLF       $Output = $Output & "PrinterState: " & $objItem.PrinterState & @CRLF       $Output = $Output & "PrinterStatus: " & $objItem.PrinterStatus & @CRLF       $Output = $Output & "PrintJobDataType: " & $objItem.PrintJobDataType & @CRLF       $Output = $Output & "PrintProcessor: " & $objItem.PrintProcessor & @CRLF       $Output = $Output & "Priority: " & $objItem.Priority & @CRLF       $Output = $Output & "Published: " & $objItem.Published & @CRLF       $Output = $Output & "Queued: " & $objItem.Queued & @CRLF       $Output = $Output & "RawOnly: " & $objItem.RawOnly & @CRLF       $Output = $Output & "SeparatorFile: " & $objItem.SeparatorFile & @CRLF       $Output = $Output & "ServerName: " & $objItem.ServerName & @CRLF       $Output = $Output & "Shared: " & $objItem.Shared & @CRLF       $Output = $Output & "ShareName: " & $objItem.ShareName & @CRLF       $Output = $Output & "SpoolEnabled: " & $objItem.SpoolEnabled & @CRLF       $Output = $Output & "StartTime: " & WMIDateStringToDate($objItem.StartTime) & @CRLF       $Output = $Output & "Status: " & $objItem.Status & @CRLF       $Output = $Output & "StatusInfo: " & $objItem.StatusInfo & @CRLF       $Output = $Output & "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF       $Output = $Output & "SystemName: " & $objItem.SystemName & @CRLF       $Output = $Output & "TimeOfLastReset: " & WMIDateStringToDate($objItem.TimeOfLastReset) & @CRLF       $Output = $Output & "UntilTime: " & WMIDateStringToDate($objItem.UntilTime) & @CRLF       $Output = $Output & "VerticalResolution: " & $objItem.VerticalResolution & @CRLF       $Output = $Output & "WorkOffline: " & $objItem.WorkOffline & @CRLF       if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop       $Output=""    Next Else    Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_Printer" ) Endif Func WMIDateStringToDate($dtmDate)     Return (StringMid($dtmDate, 5, 2) & "/" & _     StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _     & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2)) EndFunc


I'm getting an error

>"C:\Program Files\AutoIt3\SciTe\CompileAU3\CompileAU3.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\wtorres\Desktop\EUB 2.0\scriptOmatic.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams
>Running: (3.1.1.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\wtorres\Desktop\EUB 2.0\scriptOmatic.au3"
C:\Documents and Settings\wtorres\Desktop\EUB 2.0\scriptOmatic.au3 (12) : ==> Unable to parse line.:
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Printer", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
$colItems = $objWMIService.E^ ERROR
>AutoIT3.exe ended.

Which Beta did you use ? I have 3.1.1.98

#8 User is offline   kpu 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 196
  • Joined: 18-September 04
  • Location:Minnesota

Posted 05 January 2006 - 11:15 PM

I'm sure this is a little late in this chain, but what I've done is used the "PRINTUI.DLL"

Store all printer settings into a file:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /n "printer" /a "file.dat"

Restore all printer settings from a file:
RUNDLL32 PRINTUI.DLL,PrintUI /Sr /n "printer

You should be able to find a script to list all installed printers, then use the above commands to export/import the dat file. However, I don't know if you can use the *.dat file from one PC to import on another PC if it has the same Printer driver installed.

#9 User is offline   Doppio 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 126
  • Joined: 29-December 05

Posted 05 January 2006 - 11:24 PM

View Postkpu, on Jan 5 2006, 05:15 PM, said:

I'm sure this is a little late in this chain, but what I've done is used the "PRINTUI.DLL"

Store all printer settings into a file:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /n "printer" /a "file.dat"

Restore all printer settings from a file:
RUNDLL32 PRINTUI.DLL,PrintUI /Sr /n "printer

You should be able to find a script to list all installed printers, then use the above commands to export/import the dat file. However, I don't know if you can use the *.dat file from one PC to import on another PC if it has the same Printer driver installed.


That's exactly what I need, Save thesettings, and restore it after reimaging or reinstalling windows.
could you show me, or point me to a script that would do that.

#10 User is offline   Doppio 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 126
  • Joined: 29-December 05

Posted 05 January 2006 - 11:56 PM

View Postguayo, on Jan 5 2006, 05:24 PM, said:

That's exactly what I need, Save thesettings, and restore it after reimaging or reinstalling windows.
could you show me, or point me to a script that would do that.


I found this link!! Thank you all.

List Printers

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users