VMware Horizon Community
ramachandrankes
Enthusiast
Enthusiast
Jump to solution

Folder redirection for application settings

Hi Team,

We have an application where the settings will get saved C:\Program Files (x86)\<Application Name>\.

Each time when user logoff VDI, then the settings saved on the application is getting wiped off. Can we create a folder redirection for above mentioned location?

I do not want to use Writable Volumes on this regard. Is there any possibility on this regard?

I see a folder of my application in %localappdata%\<Application Name>\ , however no files / folders in it.

Also, I want to see if I can do folder redirection for the location, C:\ProgramData\<Application Name>\

Appreciate your help on this.

Thanks,

1 Solution

Accepted Solutions
sjesse
Leadership
Leadership
Jump to solution

Folder redirection or any profile management software won't manage anything in C:\program files since that is a system level folder. %localappdata% is C:\users\<username\appdata\local. The same goes for %programdata%. Writeable volumes or anything similar is the only option because these aren't places that should have any user specific data installed.

View solution in original post

5 Replies
sjesse
Leadership
Leadership
Jump to solution

Folder redirection or any profile management software won't manage anything in C:\program files since that is a system level folder. %localappdata% is C:\users\<username\appdata\local. The same goes for %programdata%. Writeable volumes or anything similar is the only option because these aren't places that should have any user specific data installed.

ramachandrankes
Enthusiast
Enthusiast
Jump to solution

Reply
0 Kudos
ramachandrankes
Enthusiast
Enthusiast
Jump to solution

Hi sJesse,

OK. I will configure writable volumes for application based settings. I wanted to know if I restrict folder redirection for particular users for respective application? If yes, can you share me a link to create writable volumes and necessary settings.

Thanks, Ram

Reply
0 Kudos
ramachandrankes
Enthusiast
Enthusiast
Jump to solution

Hi sjesse​,

Can you take a look on my above reply?

Thanks,

Reply
0 Kudos
MiMenl
Enthusiast
Enthusiast
Jump to solution

Just a small remark here.

What is being stored in the Program files folder?

Is it just 1 single file or are there multiple files.

Does the end user change the file or do you just need to provide a different file(s) based on application usage (settings .ini etc).

It actually doesn't matter much but if it's just one file and you are into some programming it's way easier to achieve than multiple files.

In our environment we have one application which needs a setting file that is stored in a folder within the application folder in the program files directory.

This file cannot be user bound but has to switch based on the users function throughout the day, the application was usually machine bound of which the location determined the setting file and the function, but with the VDI this location based installation is no longer used.

Although by tweaking a bit and leveraging UEM elevated permissions we are able to add the right file to the program files folder when needed.

You do need to program for this though.

I just create launcher or watcher programs in vb.net that could help with this.

if I use a launcher program I just cerate a .exe which will start the real program but preforms some actions before the application is launched example:

applauncher.exe will launch app1.exe

applauncher.exe will first copy a file from the network to the right place in the program files folder and than launch app1.exe once the copy is done and the existence of the file is checked.

app1.exe in this case has the right setting file. copying to program files is usually forbidden (rights) but by leveraging elevated permissions for applauncher.exe trough UEM you can work around this.

For a watcher/launcher program you could do something like this  (no real code)

copy needed files if they exist from user network share based on username.

start your program as a new process

Dim p() As Process
Private Sub CheckIfRunning()

  p = Process.GetProcessesByName("myapp")
  
If p.Count > 0 Then
 
' Process is running do nothing

   Else
  
' Process is not running start copying files

     copy files needed to a users network share based on username

     Exit watcher
  
End If
End Sub

By rechecking this every couple of seconds on a timer you can keep track if the program is still running.

By elevating this program trough UEM files can be written to the program files directory.

running the watcher program would cost some system resources but the consumption is very low.

Hope this helps.

It's not a real integrated solution but it saved me a writable volume.

If just applications would just use the roaming folder more.... would make things so much easier.

Mark

It's not code it's spaghetti, and who doesn't like pasta ?
Reply
0 Kudos