Using %USERNAME in a registry key WPS
I have a package that contains 1st run settings for an app. I have this app configured to use active setup and it will write a ton of registry entries for each user. There is one part of the registry that is named for the username i.e. HKCU\SOFTWARE\BOBSMITH\VALUES - I set it up in WPS to use the value [%USERNAME] so it pulls the username from the env variables. This seems to work fine and dandy. When I push this out through GPO, it seems that this key is trying to be created and is giving me a error 1402
Error 1402. Could not open key: HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Settings\REDList\\HOWARDBH.
Right after REDList is where the username should appear but doesn't.
There is also mention of a permission issue in the event log.
System error 87. Verify that you have sufficient access to that key, or contact your support personnel.
Obviously if I execute manually while I am logged on, everything is fine. I took this one key out and everything works fine. What is happening to cause this and how can I correct it?
Jimm
Error 1402. Could not open key: HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Settings\REDList\\HOWARDBH.
Right after REDList is where the username should appear but doesn't.
There is also mention of a permission issue in the event log.
System error 87. Verify that you have sufficient access to that key, or contact your support personnel.
Obviously if I execute manually while I am logged on, everything is fine. I took this one key out and everything works fine. What is happening to cause this and how can I correct it?
Jimm
0 Comments
[ + ] Show comments
Answers (10)
Please log in to answer
Posted by:
rmroshan
15 years ago
Posted by:
anonymous_9363
15 years ago
Posted by:
captain_planet
15 years ago
Posted by:
JimmPanik
15 years ago
Posted by:
davidkevanian
15 years ago
If you're still having problems, here's something else to consider. If the GPO is deployed at machine startup rather than at user logon, then there's no current user at this point. The installation will have completed prior to any user logging in. So the installation is trying to access a registry hive (HKCU) and an environment variable (USERNAME) that haven't been defined yet. That's also why the package works perfectly well when you run it while logged in, there exists at this point a Current User with an HKCU registry hive and a defined USERNAME environment variable.
Posted by:
JimmPanik
15 years ago
Posted by:
cygan
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.