Sign in to follow this  
Followers 0
Doppio

Backup Printer settings

10 posts in this topic

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.

Share this post


Link to post
Share on other sites



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.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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


Share this post


Link to post
Share on other sites

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.


Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

; 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

Share this post


Link to post
Share on other sites

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.

; 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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0