woleium Posted January 16, 2007 Share Posted January 16, 2007 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 More sharing options...
woleium Posted January 16, 2007 Author Share Posted January 16, 2007 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" ) satmaniac 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now