3

So I have a 32 bit MSI package that installs in Program Files on 32 bit machines and Program Files (x86) on 64 bit machines.

I am attempting to add a shortcut to this app via GP, but I'm not sure how to handle the discrepancy in the path. %PROGRAMFILES% works on the 32 bit machine, but I need to use %PROGRAMFILES(X86)% for it to work on the 64b machines.

Is there a environment variable that I can use, or how is this handled?

jscott
  • 24,204
  • 8
  • 77
  • 99
jeremib
  • 185
  • 1
  • 1
  • 6

3 Answers3

3

You could use a WMI filter in your group policy to select 32-bit OS to use one shortcut and 64-bit to use another.

uSlackr
  • 6,337
  • 21
  • 36
0

You should be able to check the value of %PROCESSOR_ARCHITECTURE% and make the decision based on that value.

squillman
  • 37,618
  • 10
  • 90
  • 145
0

My solution was to create an environment variable on every workstation, %PROGRAMFILES32%, that maps to either Program Files or Program Files (x86) as required. (I also created links to system32/syswow64 for the same reason.) As you've seen, there's no built in way to fix it. Alternately, since you need it primarily for one app, you could have the installer or a post-installation step add an environment var pointing directly to it.

I did it through Novell Zenworks, but you could just as easily create it through a group policy startup script.

SilverbackNet
  • 383
  • 2
  • 10