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.
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)
Please log in to answer
Posted by:
jagadeish
10 years ago
Posted by:
jol002
10 years ago
Posted by:
Badger
10 years ago
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!!!