locked
Folder Redirection or Symbolic Link ? RRS feed

  • Question

  • I've sequenced an application that basically takes an input file and a rules file, and outputs the results to a results folder.  Unfortunately, I've found that the results folder can only be defined relative to the application directory (Q:\Application).  I've checked with the vendor, and there's no way to provide an absolute path - it must be relative.  I've tried tricking it anyway (../../../c:/temp, or /c:/temp) but it errors out and says it can't find Q:\Application\c\temp), it just won't leave "Q:".

    I was thinking maybe there's a way to do something like a symlink or other redirection technique so that Q:\Application\Results actually points to c:\mydirectory - but the only technique I'm familiar with (mklink) doesn't work in the App-V cache so that's out.

    Any other thoughts?

    Wednesday, October 24, 2012 7:09 PM

All replies

  • Create a shim with the Application Compatibility Toolkit. Use the CorrectFilePaths fix: http://technet.microsoft.com/en-us/library/cc766201(WS.10).aspx


    Twitter: @stealthpuppy | Blog: stealthpuppy.com

    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Please remember to click "Mark as Answer" or "Vote as Helpful" on the post that answers your question (or click "Unmark as Answer" if a marked post does not actually answer your question). This can be beneficial to other community members reading the thread.

    Wednesday, October 24, 2012 8:24 PM
    Moderator
  • Hi Aaron,

    I'm having some trouble getting your solution to work (although admittedly when I first read it, I felt stupid for not thinking of it myself).  I've created a SHIM with ACT and the CorrectFilePaths rule.  In the command line for the rule, I enter:

         "Q:\MyApplication_MNT_v1.0\AppName\AppName 1.3\results;c:\temp"

    The TEMP folder is just for testing, it exists and all users have full permission to it.  The application itself works like this:

    SFTTRAY launches StartApp.exe (in the bubble) which Launches JAVA.EXE (in the bubble) with some command line parameters that point to the JAR.  I've tried to tie the rule to SFTTRAY.EXE, STARTAPP.EXE, and also JAVA.EXE but each time it runs it doesn't redirect the results folder to temp, I get access denied because I can't write inside Q:.

    The same thing happens whether I install it manually or do a Test Run inside the Compat Admin tool.

    Am I missing a step?

    Friday, October 26, 2012 5:04 PM
  • It sounds like STARTAPP.EXE or JAVA.EXE is the executable you want to target, not the App-V client itself, but you should be able to confirm that with a ProcMon log to see which process is writing the file.

    I would test outside of App-V to rule that out. Install the application in the sequencing VM just as you would if sequencing the app and apply the shim in that VM. Test to ensure that it works there first before re-trying with the sequenced application.



    Twitter: @stealthpuppy | Blog: stealthpuppy.com

    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Please remember to click "Mark as Answer" or "Vote as Helpful" on the post that answers your question (or click "Unmark as Answer" if a marked post does not actually answer your question). This can be beneficial to other community members reading the thread.


    Friday, October 26, 2012 5:08 PM
    Moderator
  • Thanks Aaron, Procmon found where I'd made my mistake.  The shim now works for every part of the application except for the part I need.  For example, when I browse, if I go to the results folder, it shows me what's in the folder I'm redirecting to, but when I hit the export button, it just appends TEMP to the folder in Q:.

    I'm going to continue to read the Technet article you'd posted, perhaps I've missed some function that the JAR uses that I'm not looking for.

    Friday, October 26, 2012 6:21 PM
  • I think this app may be a lost cause in App-V.  The SHIM is working, but as soon as I hit "Go", it looks like the application is working around it.  It starts the path with Q: and then whatever the last folder in my replacement path is (i.e. Q:\Documents, Q:\Desktop, Q:\TEMP, etc).
    Friday, October 26, 2012 7:11 PM