PDA

View Full Version : Volatile Registry Entry



NewsArchive
04-02-2013, 09:58 AM
Hi Friedrich,

how can I create a VOLATILE registry entry with SB8?

Thanks for your answer.

Markus

REG_OPTION_VOLATILE
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724844%28v=vs.85%29.aspx

NewsArchive
04-02-2013, 09:58 AM
Hi Markus,

>
> how can I create a VOLATILE registry entry with SB8?
>

The "Edit Registry..." function does not allow to set the dwOptions
parameter yet. Intenally, it's always set to "REG_OPTION_NON_VOLATILE".

Friedrich

NewsArchive
04-02-2013, 12:20 PM
:-(

Any idea how to workaround this limitation?

Markus

NewsArchive
04-02-2013, 12:21 PM
Write a little utility or dll that uses the APIs directly and call it from
the SB script.

Rick

NewsArchive
04-02-2013, 12:21 PM
What Rick said. Adding your own DLL and calling the function via "Call
Dll..." would be a temporary workaround.

I have added it to the wish list for a future version.

Friedrich

NewsArchive
04-02-2013, 12:22 PM
Hi Friedrich,

Does SetupBuilder allow the creation of Shutdown tasks within the
Registry?

If so maybe you could create the normal non-volatile key and add a
shutdown task to remove it?

Graham

NewsArchive
04-04-2013, 02:06 AM
FYI and for everyone, who needs it:

I solved the problem with a little AutoIt script, which writes the
volatile registry entry. AutoIt is only used for WRITE the registry
entry. The check, whether the key exists can be done with SB.

Here is the AutoIt script:


/////////////////////////////////////////////////////////////////

#include "..\lib\RegEditEx.au3"

Local $szKey = "HKLM\Software\Lindersoft"
Local $szValue = "PendingReboot"

_RegWrite($szKey, $szValue, $REG_NONE, "", $REG_OPTION_VOLATILE)

If @error Then
Return SetError(1)
EndIf

/////////////////////////////////////////////////////////////////

RegEditEx.au3 can be found here:

http://www.autoitscript.com/forum/topic/96124-custom-regwrite-and-regread/

Markus

NewsArchive
04-08-2013, 09:28 AM
Added! The option will be available in the next maintenance build.

---
IMPROVEMENT: [SB#3-04021] Add "Keys created are volatile" option to the
"Edit Registry..." script function.
---

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

--Helping You Build Better Installations
--SetupBuilder "point. click. ship"
--Create Windows 8 ready installations in minutes
--Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-08-2013, 09:29 AM
GREAT! Thank you!

Markus Zander