locked
Usage of Folder token in App-V 5.0 RRS feed

  • 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

    Friday, August 1, 2014 11:39 AM
    Moderator
  • 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

    Thursday, July 31, 2014 3:42 PM
    Moderator

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

    Thursday, July 31, 2014 3:42 PM
    Moderator
  • 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

    Friday, August 1, 2014 11:39 AM
    Moderator