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

Comments

Please log in to comment

Answers

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

Answered 10/02/2014 by: jagadeish
Red Belt

Please log in to comment
0
Yes, SP2, HF4.
How can I do what you suggest about to apply "RunAsInvoker" shim on target exe using DeploymentConfig.xml?
Answered 10/02/2014 by: jol002
White Belt

Please log in to comment
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!!!

Answered 10/06/2014 by: Badger
Red Belt

  • Yes, I did this, but it doesn't help.
    • so you ticked all the boxes.... then saved the new .appv package, tested it on a clean machine???
Please log in to comment
Answer this question or Comment on this question for clarity