Jump to content

Recommended Posts

I am writing a script to uninstall all locally installed printers and then use the printmig tool from MS to automatically import a default printer config for our CAD users.

What I want to do is delete all keys under "HKLM\software\microsoft\windows nt\currentversion\print\printers", however it is impossible for me to know what the key names will be since the names reflect the names of the installed printers on each machine. There are also some registry values directly under the \Printers key that I need to keep, so I cannot delete the Printers key in its entirety. How would I go about doing this? I tried RegDelete ("<path>\*") but I guess RegDelete does not support wildcards.

Ideas?

Thanks!

Link to post
Share on other sites
  • Developers

I am writing a script to uninstall all locally installed printers and then use the printmig tool from MS to automatically import a default printer config for our CAD users. 

What I want to do is delete all keys under "HKLM\software\microsoft\windows nt\currentversion\print\printers", however it is impossible for me to know what the key names will be since the names reflect the names of the installed printers on each machine.  There are also some registry values directly under the \Printers key that I need to keep, so I cannot delete the Printers key in its entirety.  How would I go about doing this?  I tried RegDelete ("<path>\*") but I guess RegDelete does not support wildcards.

Ideas?

Thanks!

<{POST_SNAPBACK}>

RegEnumKey() ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...