Answered by:
Usage of Folder token in App-V 5.0

Question
-
Hi,
Can i use the Folder tokens such as AppVComputerName, AppVCurrentUserSID, AppVPackageRoot....etc in ini and cmd files. I found that it is used in Deployment config files. Apart from the Deploymentconfig file, can we use it in ini and cmd files, as we used %CSIDL...% in App-v 4.x.
Thanks,
Prem
Wednesday, July 30, 2014 7:11 AM
Answers
-
You could use powershell and just replace what you have to replace.
Note that depending on the INI file location the user might need specific permissions
(Get-Content file.txt) | Foreach-Object {$_ -replace '\[MYID\]','MyValue'} | Out-File file.txt
Falko
Twitter @kirk_tn | Blog kirxblog | Web kirx.org | Fireside appvbook.com
- Proposed as answer by CodyLambertModerator Monday, August 4, 2014 7:34 PM
- Marked as answer by Brandon RecordsModerator Thursday, August 7, 2014 3:26 PM
Friday, August 1, 2014 11:39 AMModerator -
I don't hink that this is possible (and also I think that the CSIDLs could not be used in INI or CMD files with App-V 4 either).
As the pattern of [{... }] are quite easy to identify, you should be able to run a text search&replaced (like with powershell) before you start the application.
Falko
Twitter @kirk_tn | Blog kirxblog | Web kirx.org | Fireside appvbook.com
- Proposed as answer by RorymonMVP Thursday, July 31, 2014 5:21 PM
- Marked as answer by Brandon RecordsModerator Thursday, August 7, 2014 3:25 PM
Thursday, July 31, 2014 3:42 PMModerator
All replies
-
I don't hink that this is possible (and also I think that the CSIDLs could not be used in INI or CMD files with App-V 4 either).
As the pattern of [{... }] are quite easy to identify, you should be able to run a text search&replaced (like with powershell) before you start the application.
Falko
Twitter @kirk_tn | Blog kirxblog | Web kirx.org | Fireside appvbook.com
- Proposed as answer by RorymonMVP Thursday, July 31, 2014 5:21 PM
- Marked as answer by Brandon RecordsModerator Thursday, August 7, 2014 3:25 PM
Thursday, July 31, 2014 3:42 PMModerator -
Falko,
Thanks for your reply.
In that case, if there is any hardcoded entry in any ini file, how can we fix it in App-v 5?
Thanks,
Prem
Friday, August 1, 2014 2:43 AM -
You could use powershell and just replace what you have to replace.
Note that depending on the INI file location the user might need specific permissions
(Get-Content file.txt) | Foreach-Object {$_ -replace '\[MYID\]','MyValue'} | Out-File file.txt
Falko
Twitter @kirk_tn | Blog kirxblog | Web kirx.org | Fireside appvbook.com
- Proposed as answer by CodyLambertModerator Monday, August 4, 2014 7:34 PM
- Marked as answer by Brandon RecordsModerator Thursday, August 7, 2014 3:26 PM
Friday, August 1, 2014 11:39 AMModerator