#37892 - 2003-03-13 04:01 PM
SaveKey Errors
|
chapel
Lurker
Registered: 2003-01-31
Posts: 2
Loc: Washington, D.C.
|
Hi-
I have Kixtart running as a login script.
This particular code is designed to export a key to a file, create a new key, and load the information into the new key.
I've attached a very short section of the code.
code:
$profiles = 'HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles' $defaultid = ReadValue("$profiles", "defaultprofile")
$tmpfile='%userprofile%\profile.tmp' $ReturnCode = SaveKey('$profiles\$defaultid', $tmpfile) ? $ReturnCode $ReturnCode=AddKey('$profiles\backup') ? $ReturnCode $ReturnCode=LoadKey('$profiles\backup', $tmpfile) ? $ReturnCode
The returncodes are as follows, in order: 1314 0 1314
the users on the machine MUST only have user privelages. I use ScriptLogic to execute the script.
1314 means there are insufficient rights to the registry. I'm a bit confused as to why it lets me add a key to the users hive file but not save the info from the same hive file (different key) or load into the key that i create.
Anyone have ideas regarding maybe an alternate way of doing it, or doing a "runas" type deal as an admin, while maintaining the CURRENT USER as the actual user's hive?
Thanks! [ 13. March 2003, 16:04: Message edited by: chapel ]
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 696 anonymous users online.
|
|
|