Jump to content

Volatile Registry Keys


Recommended Posts

Hi, was just curious if a volatile registry key could be created with built in AutoIT functions or is VBS the only way?

Ex: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired

This is the volatile key used by Windows Update Agent. When the system reboots it will be deleted since it's held in memory.

Can AutoIT make something like this or do I have to start converting VBS?

**The only limit is what you believe they tell you it is**

Link to comment
Share on other sites

Any registry functions that can be done using VBS can be done using AutoIt. On a side note, if it was "held in memory" it wouldn't need the registry entry.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I'm aware that VBS can be written in AutoIT. I was curious as to whether or not there was a simple function like "Regwrite" (though I didn't see it in the help file) instead of writing it in VBS. Maybe some one has created a UDF for this kind of thing. Sounds like there isn't though, but no big deal.

Also, the registry key is not necessary unless you want something else to know it is there say a another program wondering if the system needs a reboot. According to Microsoft it is held in memory "http://msdn.microsoft.com/en-us/library/ms724844(VS.85).aspx"

REG_OPTION_VOLATILE

0x00000001L

"All keys created by the function are volatile. The information is stored in memory and is not preserved when the corresponding registry hive is unloaded. For HKEY_LOCAL_MACHINE, this occurs when the system is shut down."

**The only limit is what you believe they tell you it is**

Link to comment
Share on other sites

Ok, I must not be explaining what I'm looking for correctly. That's ok, because I'm pretty sure that there is no prebuilt function for this.

I have looked at "at the poor helpfile, in the functions, in the Registry Management ... ". It doesn't discuss a function that does what I'm looking for as far as I can tell.

Thank you all for the input anyways.

**The only limit is what you believe they tell you it is**

Link to comment
Share on other sites

Inverted -

A regular Regwrite will remain once I reboot the machine. I could have something else to attempt to delete it after the fact but that's not what I'm trying to accomplish. The idea is to have it stored somewhere where other apps can see/read it, but disappear if for any reason the system powers down or reboots.

Richard -

What DllCall did you have in mind? Can you give an example?

**The only limit is what you believe they tell you it is**

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...