Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Should a registry key always be set with a value?

$
0
0

Just a quick one

 

On something im doing it sets a key based on essentially a yes or no question like this but im getting some weird answers on some parts of the gui and i wondered if this was causing it

                    Local $WinUpdateCheck = MsgBox($MB_YESNO + $MB_ICONWARNING + $MB_DEFBUTTON2, 'Update Check', 'Are The Updates Completed')                     If $WinUpdateCheck = 6 Then                         GUICtrlSetImage($WinUpdateIcon, $tick)                         RegWrite('HKEY_LOCAL_MACHINE\SYSTEM\Setup\Simple', 'Updates', 'REG_SZ', _Date_Time_SystemTimeToDateTimeStr($CuDate))                     ElseIf $WinUpdateCheck = 7 Then                         GUICtrlSetImage($WinUpdateIcon, $cross)                         RegWrite('HKEY_LOCAL_MACHINE\SYSTEM\Setup\Simple', 'Updates', 'REG_SZ', 'False')                     EndIf

So the question really is should i set the negative key as the word False?

 

O should it be set as '' , does it matter setting a word what happens if the key doesn't exist ? that would make a third condition wouldn't it

 

So should i set the key differently than i am

 

Advice please


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>