/build/static/layout/Breadcrumb_cap_w.png

How to add a new directory in the local filesystem with the config.xml-file of appv 5.0

Hi, I have an appv-package that needs a subfolder under C:\ProgramData to write a logfile. This is not possible while you need admin-rights to write C:\ProgramData.
A workaround is to rightclick the shortcut of the application and then click "Run as Administrator"; this works fine, however, it is not what I want.
The solution is to create the needed subfolder together with the publishing of the package. I tested the application after I manually created the needed folder, and then the application works fine as well.
So I need to do some md-command whith a userscript in the config.xml-files. I tried to put the md-command in the script, this does not work. So I added a file named Mkdir.cmd to the package, and tried to start it via the deploymentconfig.xml. This does not work as well, so I think the syntax is not ok. (btw: if I doubleclick the Mkdir.cmd in the vfs it works fine, and the needed subdir will be created).
Here is my script: (I'm sorry, this website deletes all xml-tags, so only the path and the ApplicationId are left)


Does anyone have some suggestion?
Thanks in advance.

0 Comments   [ + ] Show comments

Answers (3)

Posted by: jagadeish 9 years ago
Red Belt
0

Are you using App-V 5.0 SP2 HF4?

If nothing works then try to apply "RunAsInvoker" shim on target exe using DeploymentConfig.xml

Posted by: jol002 9 years ago
White Belt
0
Yes, SP2, HF4.
How can I do what you suggest about to apply "RunAsInvoker" shim on target exe using DeploymentConfig.xml?
Posted by: Badger 9 years ago
Red Belt
0

so you're running a mkdir.cmd from the directory you need to create the folder in???

why don't you just tick the box in the advanced settings that allows users to write to the virtual file system.

This was one of the big deal fixes in SP2 hf4.
Now you don't need to elevate to admin permissions.

From the comments above, even if you run as invoker, it will fail as the ProgramData is write protected (for std users)

Tick the box!!!


Comments:
  • Yes, I did this, but it doesn't help. - jol002 9 years ago
    • so you ticked all the boxes.... then saved the new .appv package, tested it on a clean machine??? - Badger 9 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ