Jump to content

Question about registry key


Aloha

Recommended Posts

I want to know if there is a way to lock a single registry key. For example, this key (I got it from RP7):

[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
"CaptionWidth"="-500"
"CaptionHeight"="-315"

It has effects on the current theme after I run the reg file and log off. But when I apply another theme, the key will automatically change to the following:

[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
"CaptionWidth"="-345"
"CaptionHeight"="-345"

It doesn't matter or take long time to run the reg file again and log off the computer again. But it will be great if I don't have to do that every time I change the skin. Can someone know a way to lock it forever, if possible?

Thanks for any help and reply.

Edit: why no one tells me about my mistake? I wrote "register" instead of "registry".

Edited by Aloha
Link to comment
Share on other sites


You can always make your computer apply it automatically at startup though.
Can you tell me how, Th3_uN1Qu3? Thank you for replying.

(Why do you write your name so strange?)

Link to comment
Share on other sites

You can always make your computer apply it automatically at startup though.
Can you tell me how, Th3_uN1Qu3? Thank you for replying.

(Why do you write your name so strange?)

Hi there. Use regedit in win98SE mode first to export the registry setting you want to keep. Say C:\savedreg.reg. Then reboot into DOS, and use Regedit in real mode to import it back into the Registry. Once you're happy that it's doing what you want, automate the importing via suitable command in autoexec.bat.

To review the real mode Registry Editor switches type REGEDIT /? at the command prompt.

Edited by Analada
Link to comment
Share on other sites

Analada, what you said sounds like an impossible mission to me. I managed to follow exactly what you suggested. But I don't know what is the "suitable command" I should have in autoexec.bat. If I put "savedreg" (without quotation-marks) in it, I'll have "Bad command or file name" on booting Windows. It won't run a .reg file, will it? I have a poor knowledge about such thing. I didn't think it was so complicated as this.

PS. why do I have to import the registry key from DOS instead of doing it right from Windows? Working with DOS is a hair-raising experience!

Link to comment
Share on other sites

Analada, what you said sounds like an impossible mission to me. I managed to follow exactly what you suggested. But I don't know what is the "suitable command" I should have in autoexec.bat. If I put "savedreg" (without quotation-marks) in it, I'll have "Bad command or file name" on booting Windows. It won't run a .reg file, will it? I have a poor knowledge about such thing. I didn't think it was so complicated as this.

PS. why do I have to import the registry key from DOS instead of doing it right from Windows? Working with DOS is a hair-raising experience!

Are you sure you put in "savedreg.reg" (or the filename you exported your registry key to) in Autoexec.bat? Use

REGEDIT /S C:\yourfile.reg

Where yourfile.reg is your saved registry modification, which must reside in the root of your C drive. !!! DOS can't work with filenames larger than 8 characters, so make sure <yourfile>'s name is at most 8 characters, and has the .reg extension. !!!

Why do you say it's a hair-raising experience? Working with DOS is cool. :yes: It can run a ton of classic games and can get you out of impossible situations without reinstalling windoze.

Of course you can run it in windoze, but you'll get that annoying "are you sure you want to add blah blah" prompt every time you start up your computer...

About my name, dunno, it's been like that for a few years. Thought it looks cool.

Edited by Th3_uN1Qu3
Link to comment
Share on other sites

Analada, what you said sounds like an impossible mission to me. I managed to follow exactly what you suggested. But I don't know what is the "suitable command" I should have in autoexec.bat. If I put "savedreg" (without quotation-marks) in it, I'll have "Bad command or file name" on booting Windows. It won't run a .reg file, will it? I have a poor knowledge about such thing. I didn't think it was so complicated as this.

PS. why do I have to import the registry key from DOS instead of doing it right from Windows? Working with DOS is a hair-raising experience!

Are you sure you put in "savedreg.reg" (or the filename you exported your registry key to) in Autoexec.bat? Use

REGEDIT /S C:\yourfile.reg

Where yourfile.reg is your saved registry modification, which must reside in the root of your C drive. !!! DOS can't work with filenames larger than 8 characters, so make sure <yourfile>'s name is at most 8 characters, and has the .reg extension. !!!

Why do you say it's a hair-raising experience? Working with DOS is cool. :yes: It can run a ton of classic games and can get you out of impossible situations without reinstalling windoze.

Of course you can run it in windoze, but you'll get that annoying "are you sure you want to add blah blah" prompt every time you start up your computer...

About my name, dunno, it's been like that for a few years. Thought it looks cool.

Yes, that's one of the great things about win98SE - DOS. You can really take control of your PC in a way which isn't always possible with later OSes. Learn the incredible power of batch files, for instance (do Google) :)

But i digress. If you're not happy working with Regedit, then it might be best to leave well alone, or send PM for detailed but "at your own risk" advice.

Link to comment
Share on other sites

Yes, that's one of the great things about win98SE - DOS. You can really take control of your PC in a way which isn't always possible with later OSes. Learn the incredible power of batch files, for instance (do Google) :)

But i digress. If you're not happy working with Regedit, then it might be best to leave well alone, or send PM for detailed but "at your own risk" advice.

Ahaha, batches... Don't get me started on that, two lines and you can make your computer completely unbootable. And it's not only on 9x. :whistle:

Link to comment
Share on other sites

Then again, you can just run "REGEDIT /S C:\yourfile.reg" in windows, by creating a shortcut having "REGEDIT /S C:\yourfile.reg" as the target and putting it in the StartUp folder in the Start Menu... HTH.

Edited by dencorso
Link to comment
Share on other sites

Yes, that's one of the great things about win98SE - DOS. You can really take control of your PC in a way which isn't always possible with later OSes. Learn the incredible power of batch files, for instance (do Google) :)

But i digress. If you're not happy working with Regedit, then it might be best to leave well alone, or send PM for detailed but "at your own risk" advice.

Ahaha, batches... Don't get me started on that, two lines and you can make your computer completely unbootable. And it's not only on 9x. :whistle:

What two lines? I want to run them!

Link to comment
Share on other sites

Th3_uN1Qu3, thank you very much for your reply.

- The line "REGEDIT /S C:\yourfile.reg" doesn't work, saying "Invalid Switch".

- The line "REGEDIT C:\yourfile.reg" works great, exactly what I want.

Why do you say it's a hair-raising experience?
Because all the DOS commands I know are: copy, dir, del, and format! I feel uncomfortable when I have to do something from DOS. I find out I can do all the above things in a simple way just right from Windows, something like this:

- Give the registry key from RP7 a short name, then put it into drive C.

- Open Autoexec.bat in Notepad, add the line "REGEDIT C:\yourfile.reg", then Save and Exit.

That's all. It will take effect when I reboot Windows.

About my name, dunno, it's been like that for a few years. Thought it looks cool.
I don't find your name cool or hot. I asked you just because I can easily type everyone's name, but with yours, I have to copy and paste! The_Unique looks nicer, just my own opinion.

OK, thanks again for all the help and replies on this thread. I learned something new about the Autoexec.bat. I've seen it on my computer for ages but today is the first time I've done something with it. How interesting!

Link to comment
Share on other sites

About my name, dunno, it's been like that for a few years. Thought it looks cool.
I don't find your name cool or hot. I asked you just because I can easily type everyone's name, but with yours, I have to copy and paste! The_Unique looks nicer, just my own opinion.

And must be pretty hard to login with...

Link to comment
Share on other sites

Th3_uN1Qu3, thank you very much for your reply.

- The line "REGEDIT /S C:\yourfile.reg" doesn't work, saying "Invalid Switch".

- The line "REGEDIT C:\yourfile.reg" works great, exactly what I want.

Why do you say it's a hair-raising experience?
Because all the DOS commands I know are: copy, dir, del, and format! I feel uncomfortable when I have to do something from DOS. I find out I can do all the above things in a simple way just right from Windows, something like this:

- Give the registry key from RP7 a short name, then put it into drive C.

- Open Autoexec.bat in Notepad, add the line "REGEDIT C:\yourfile.reg", then Save and Exit.

That's all. It will take effect when I reboot Windows.

I don't find your name cool or hot. I asked you just because I can easily type everyone's name, but with yours, I have to copy and paste! The_Unique looks nicer, just my own opinion.

OK, thanks again for all the help and replies on this thread. I learned something new about the Autoexec.bat. I've seen it on my computer for ages but today is the first time I've done something with it. How interesting!

Doh, i confused the win9x regedit command line with the 2k/xp one. :P Heh, you know enough basic DOS commands, but you should also learn about deltree. On 9x systems, it allows you to remove windows without reformatting. :)

And must be pretty hard to login with...

I use Opera, which has a built-in password manager. :D Besides, i can type pretty fast, and i'm used to typing my name after these three years. ;)

Link to comment
Share on other sites

It has effects on the current theme after I run the reg file and log off. But when I apply another theme, the key will automatically change to the following:

Isn't the problem here that it is one of the settings a theme sets?

Would the solution be, therefore, to reconfigure this setting into your individual themes?

Either that, or switch themes less often.

Link to comment
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...