I have this entry in an application’s OSD file: -

%PATH%;%CSIDL_PROGRAM_FILES%\Microsoft Office\Office14\;

The problem with this is that it will add an incorrect path if the user has any other version of Office (well, Winword.exe) installed. I can determine the registry key to retrieve the correct path (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe\Path) and I’ve used a vbscript within a cmd prompt in the app’s “bubble” to confirm that any App-V env vars set in an OSD are “Process” level ones, not “User” or “System”. So I’ve tried setting the %PATH% (attempted the User, System, and Process environments) with a pre=launch vbscript within the same OSD file, all to no effect.

Can I get a dynamic value in here or will I have to create multiple sequences for each Office version within the estate? The latter seems rather inflexible.

0 Comments   [ + ] Show Comments


Please log in to comment


Just thinking aloud here - if you include every possible Office path in your path statement in the OSD it will look at every location mentioned until your Winword.exe is located.

Not sure how viable that suggestion is, but it may solve your issue.


Answered 04/04/2012 by: dunnpy
Red Belt

  • Hi Dunnpy,

    Yes, that would probably do it and the %PATH% length would be fine. I'm assuming you can't have 2 versions of Office installed simultaneously otherwise you'd always want the latest first (so would still need a sequence upgrade if MS drop the \Officexx folder naming convention for the next releases).

    But the whole thing is a bit messy, no? It may only work in this case because I can predict these Office values. You'd think it would be a reletively straightforward procedure to pull out a value from the Registry and pop it into an env var.

    And it probably is, but I've not been using App-V long so haven't noticed it yet.

Please log in to comment
Answer this question or Comment on this question for clarity