If the account logging on isn't an admin, you can not make changes to the Local machine portion of the registry

This is an admin check I wrote that seems to work.

$RC=Addkey("HKEY_LOCAL_MACHINE\Software\AdministratorCheck")
$RC=Existkey("HKEY_LOCAL_MACHINE\Software\AdministratorCheck")
if $RC=0
;? "You have Administrator Access"
$RC=DELkey("HKEY_LOCAL_MACHINE\Software\AdministratorCheck")
Else
;? "Could not obtain Administrator Access"
Goto END
Endif

[This message has been edited by alconnole (edited 11 June 2001).]