Hi Guys,Im having trouble using the Writevalue command. Im trying to change the Country code when students logon via a the following code
code:
WriteValue("HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}","","My Computer %computername%","REG_SZ")
:start
$locale = readvalue("HKEY_CURRENT_USER\Control Panel\International", "Locale")
If $locale = "00000409"
GOTO "changecountry"
else
? "Locale is United Kingdom"
exit
endif
sleep 5
:changecountry
writevalue("HKEY_CURRENT_USER\Control Panel\International", "Locale", "00000809", "REG_SZ")
If @error = 0
GOTO "start"
endif
what happens is after this part of the code is executed all other commands that have been run such as drive mappings are no longer applied. so if some drivers are mapped before the registry changes are made they are no longer mapped when the user is logged on.
any ideas will be appreciated.
Mike