VMware Horizon Community
norgemauli
Contributor
Contributor

AppVolumes 4 custom scripts user context

Hi All, 

we have some Applications on AppVolumes 2.18 that require the use of custom scripts. Some require system context but other require user context. 

In AppVolumes 2.X no Problem, however, the same scripts in AppVolumes 4 seem to be on the Agent Side now, and subject to updates. We used them on the AppStack in the past (ie.: Firewall Rule for a particular app, or license activation). 

We found this link to the documentation Default and Custom Configuration Files which references custom scripts. This is new in AppVolumes 4 and they all run in system context. In order for them to run at all, which I didn't find on that page, you need to configure "RunAppEventScripts" under the "HKLM\SYSTEM\CurrentControlSet\services\svservice\Parame... . 

Now the scripts execute, but both in system context. 

Documentation states: 

To run a custom script in the user context, you can add an entry in the registry key, HKLM\SOFTWARE\... 

The problem I have is that when I configure this run key, the "{Appstack Volume Guid}" and "{App Guid}" Change from the provisioning machine to end user terminal and the AppGUID I believe changes every time I update the volume. Therefore, I can never run anything in user context. There probably is a simple solution to this that I haven't found yet. 

Would anybody know what the solution is? 

 

Reply
0 Kudos
5 Replies
Micheal_A
VMware Employee
VMware Employee

Do you have DEM? Best practice is to use DEM to manage these changes for the application via DEM.

VMware EUC by Broadcom
https://techzone.vmware.com/
Reply
0 Kudos
norgemauli
Contributor
Contributor

We do have DEM, yes, but some of the things we need to do to get some inhouse apps to work would be very difficult to do with DEM, if not impossible. 

We had a solution and AppVolumes 4 is supposed to provide this functionality too, it would be nice if we could get it to work this way. It would also be nice if everything that an application requires could be packed in the AppStack.

In case we cannot, I am assuming you mean set a condition for AppStack attached, or if the user is part of an AppStack entitlement group and then you would combine scripts and privilege elevation in case admin privileges would be required? 

 

Reply
0 Kudos
norgemauli
Contributor
Contributor

I have received an additional feedback that I don't fully understand: 

 

" The config file for the appstack / package is the appropiate place for this. The location of that file depends on the version of App Volumes"

From v2 the only config file I know of is the snapvol.cfg - but this only records paths to be virtualized. Any idea what this could mean? 

Reply
0 Kudos
julatoski
VMware Employee
VMware Employee

There is a binary available from Global Support called "RunAsUser.exe" that can be used to execute code as the user from the .bat System context.  I would ask that you also file a request so that we can track it and update you if we bring it to the GA product ISO: https://wsone.ideas.aha.io/?category=6800444093779262733

Thank you.

 

 


Jeff Ulatoski
Product Line Manager, App Volumes
Reply
0 Kudos
jhol5
Enthusiast
Enthusiast

"Logon.bat", "Shellstart.bat", and "Logon_postsvc.bat" are still relevant to AppVol 4 and still run under the user context. You can put these bat files under the Custom folder as well so that they will be untouched by agent upgrades. 

 

Batch Scripts for App Volumes workflow (vmware.com)

 

Also, DEM should be able to do anything App Volumes can do under the user context and more.

Reply
0 Kudos