Sign in to follow this  
Followers 0
woleium

regwrite dword problem

2 posts in this topic

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

Share this post


Link to post
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" )

1 person likes this

Share this post


Link to post
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
Sign in to follow this  
Followers 0