Sup!
Got a script that installs an application. It needs to be OS agnostic, in as much as, it should work on both x64 and x86 platforms.
The script installs the app fine, but the next part of the script needs to go the application folder and run additional steps. Obviously, here, the path will either be:
or
Is there a way to programatically get Powershell to know which program files folder to use?
I'd like to avoid two scripts if possible
I'm assuming architecture variable or similar?
Got a script that installs an application. It needs to be OS agnostic, in as much as, it should work on both x64 and x86 platforms.
The script installs the app fine, but the next part of the script needs to go the application folder and run additional steps. Obviously, here, the path will either be:
PHP:
C:\Program Files
or
PHP:
C:\Program Files x86
Is there a way to programatically get Powershell to know which program files folder to use?
I'd like to avoid two scripts if possible

I'm assuming architecture variable or similar?
Last edited: