App-V 5 -Script to edit registry not working

I am inserting a User script to add a registry entry before launching the application. But the script works only for the administrator. for the normal user its throwing the error stating that "Registry editing is disabled by administrator".

In App-V any changes happens within the bubble, should have full permissions to standard user. But i dont know, why i am getting this error.

Note: its HKCU entry that i am trying to change.

March 31st, 2014 10:04am

How do you call your registry editing script? 

Free Windows Admin Tool Kit Click here and download it now
March 31st, 2014 10:39am

Hi Mahdi,

Thanks for responding. Please fine the config and script file below.

<UserScripts>
      <StartVirtualEnvironment RunInVirtualEnvironment="true">
        <Path>C:\Windows\System32\CMD.EXE</Path>
        <Arguments>\\AppV-Dev_5\IRIS_SYDNonProd\IrisSYDnp.bat</Arguments>
        <Wait RollbackOnError="true"/>   
      </StartVirtualEnvironment>
</UserScripts>

IrisSYDnp.bat

reg add "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\IRIS\Database" /v "LocalPath" /t REG_SZ /d 

"\\XenTSProfiles\AppSpecific\IRIS\%UserName%\SYD_NONPROD" /f

reg add "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\IRIS\ERROR" /v "Path" /t REG_SZ /d 

"\\XenTSProfiles\AppSpecific\IRIS\%UserName%\SYD_NONPROD" /f

reg add "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\IRIS\Settings" /v "ShortcutsPath" /t REG_SZ /d 

"\\XenTSProfiles\AppSpecific\IRIS\%UserName%\SYD_NONPROD\Shortcuts" /f

March 31st, 2014 10:59am

I would suggest you to use a different approach for injecting registry keys to the machines. I always add my desire registry keys to a system then exporting that node as .reg file and apply it using GPO. I have been using this since 2003 when I was injecting registry keys to windows XP clients and so far I have been successful. Take a look at my blog to find what my approach is. The content is not related to the topic but you can use the method I use for deploying registry keys.

Regards.

Free Windows Admin Tool Kit Click here and download it now
March 31st, 2014 11:52am

the values are differ from user to user, so .REG file will not work in this scenario. and i am trying this in Windows 7 environment.
March 31st, 2014 1:20pm

> the normal user its throwing the error stating that "Registry editing is > disabled by administrator".   Seems you enabled http://gpsearch.azurewebsites.net/#4756   And as you are using %username%, you can do this easily with Group Policy Preferences Registry.  
Free Windows Admin Tool Kit Click here and download it now
April 1st, 2014 4:44am

The Standard Users having full access to the HKCU entries. As a statndard user i can edit and modify the HKCU entries, But i cant do it via the Script as a standard user.
April 1st, 2014 6:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics