Jump to content
Sign in to follow this  
ajcrewmisfit

(Default) value in the registry... overwriting?

Recommended Posts

ajcrewmisfit

$var = RegRead("HKEY_CLASSES_ROOT\.tif", "(Default)")
MsgBox(4096, "Program used for TIF:", $var)

RegDelete("HKEY_CLASSES_ROOT\.tif", "(Default)")
RegWrite("HKEY_CLASSES_ROOT\.tif", "(Default)", "REG_SZ", "TIFImage.Document1")

I am guessing that you cannot delete the (Default). Is there a way to overwrite the default?

The code above will output an empty string via the MsgBox. Then when you look at the registry you will find that you know have two (Default) values. One with the original (Default) value and another with the newly written (Default).

I dont know of any other way... i think i may be at the bottom of the box on this one?


------------------------------------------------------------------If it were up to me, all computer stuff would work

Share this post


Link to post
Share on other sites
Valik

Reading the help file is a wonderful way to find the answer to a question. Quoted directly from the documentation for RegRead or RegWrite:

It's apparently not in the stable help file. The functionality is there, however.

To access the (Default) value use "" (a blank string) for the valuename.

Edited by Valik

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.