Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: RegOpenKeyEx Notes
You have to apply the mode at the layer where the restriction is set, not simply to the final destination.
In the following example, the Runonce key is apparantly write-only!
;put the value in place, then try to read it regsetvalue(@REGCURRENT,"\Software\Microsoft\Windows\CurrentVersion\Runonce[COLORS]", "xyzzy") ;method 1 (fails) ;x = regquerystr(@REGCURRENT,"\Software\Microsoft\Windows\CurrentVersion\Runonce[COLORS]") ;method 2 (fails) ;w = regopenkeyEx(@REGCURRENT,"\Software\Microsoft\Windows\CurrentVersion\Runonce",1|8,"","") ;x = regqueryvalue(w,"[COLORS]") ;RegCloseKey(w) ;method 3 (works) wa = regopenkey(@REGCURRENT,"Software\Microsoft\Windows\CurrentVersion") wb = regopenkeyEx(wa,"Runonce", 1, "","") x = regqueryvalue(wb,"[COLORS]") RegCloseKey(wb) RegCloseKey(wa) message("x=",x) exit
Article ID: W15681
File Created: 2003:05:13:11:29:30
Last Updated: 2003:05:13:11:29:30