Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Are you using Preferences or a script to create the shortcut via Group Policy? –  jscott Oct 11 '11 at 15:49
add comment

3 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
So create a separate policy for each? –  jeremib Oct 11 '11 at 15:54
    
That's correct. You would need two policies –  uSlackr Oct 11 '11 at 16:57
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.