Jump to content

regwrite dword problem


woleium
 Share

Recommended Posts

This doesn't work. I can't find any info on syntax for writing DWORDs to the registry. Any ideas?

CODE
$currstate = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "StartMenuFavorites")

if $currstate = 0 then

$currval = "are not"

else

if $currstate = 2 Then

$currval = "are"

Else

$currval = "Unknown"

EndIf

EndIf

$ans = MsgBox(4, "Favorites in start menu", "Favorites "& $currval &" currently displayed in start menu. " & @LF & "Do you want to change this value?")

if $ans = 6 Then ;yes

if $currstate = 0 Then

RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" [,"StartMenuFavorites", "DWORD", "00000002"] )

Else

RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" [,"StartMenuFavorites", "DWORD", "00000000"] )

EndIf

EndIf

if $ans = 7 then ;no

exit

EndIf

Link to comment
Share on other sites

This doesn't work. I can't find any info on syntax for writing DWORDs to the registry. Any ideas?

CODE
$currstate = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "StartMenuFavorites")

if $currstate = 0 then

$currval = "are not"

else

if $currstate = 2 Then

$currval = "are"

Else

$currval = "Unknown"

EndIf

EndIf

$ans = MsgBox(4, "Favorites in start menu", "Favorites "& $currval &" currently displayed in start menu. " & @LF & "Do you want to change this value?")

if $ans = 6 Then ;yes

if $currstate = 0 Then

RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" [,"StartMenuFavorites", "DWORD", "00000002"] )

Else

RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" [,"StartMenuFavorites", "DWORD", "00000000"] )

EndIf

EndIf

if $ans = 7 then ;no

exit

EndIf

d'oh

CODE
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" ,"StartMenuFavorites", "DWORD", "00000000" )

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...