Set HKCU registry value based on logged on user

Comments

4 comments

  • Shane Corellian

    Yes, there is a variable called %USERNAME%. If you need to have the domain name be part of the value then you could use %USERDOMAIN%\%USERNAME%. Make sure to have the condition set to Only Run If A User Is Logged On and change the Run As Option (for the registry step) to Run As Logged On User.

    0
    Comment actions Permalink
  • SelfMan

    If you are on a domain, its better to use the group policy or a logon script which run in the user context. The deployments allways run under the deployers credentials if they are not specified differently. I am using something simmilar. Check the attachment.

    0
    Comment actions Permalink
  • Chase Jordan

    Just to see if everything else worked correctly, I added a registry key with my username as the data path, with me logged into during the deployment.  Unfortunately when I launch the program, I am still prompted to enter a license key.  So I believe I'm missing something else.

     

    I've successfully deployed the software to the PC, but there is a second executable that (without PDQ) is to be launched after the install.  This executable pops up a window prompting the user to input the name of the license sever associated with that program.  I did that on one PC and just installed the software on another.  I went through the registry and found every instance of the server name that I could find and tried manually adding those to the other registry with PDQ to see if that would keep me/the other users from having to launch the second executable and enter in the server name.  Unfortunately, even using PDQ to add those registry keys, I'm still prompted to enter in a license.  I'm now wondering if it's possible to run a batch file that will automatically launch the executable and somehow enter in the necessary data...

    0
    Comment actions Permalink
  • SelfMan

    I would suggest you contact your vendor and ask a for a silent installer.

    There is however a possibility to use AutoIt https://www.autoitscript.com/site/autoit/, but you have to learn how to use it first.

    0
    Comment actions Permalink

Please sign in to leave a comment.