Sign in to follow this  
Followers 0
sublimnl

RegDelete question

3 posts in this topic

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!

Share this post


Link to post
Share on other sites



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() ?

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

utilize RegEnumKey or RegEnumValue to search for the name...

Lar.

and please try before posting "How do I do that?"

<{POST_SNAPBACK}>

Thanks guys, I'll give it a look. BTW, I did search before asking. I'm a noob here but I know forum etiquette. :)

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