Archive: Determine OS and run appropriate exe.


Determine OS and run appropriate exe.
Hi all. I am fairly new to this so please bear with me.

I am trying to figure out how to determine if the person installing is running 64 bit Vista or a 32 bit OS, and I can 't seem to find a way to do that.

Also I am sure this is probably very basic, and I am still searching help to try to figure it out, but once I know what OS I have I want to run either

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase

or

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase

I think I have the Exec statement worked out, but I am not sure how to do a If - Then type of function.

Hmmm maybe that is the answer? I try to run the 64 version and if it fails I run the 32 bit one?

Any help greatly appreciated.


Please have a look at these files, should be easy to use ;)

NSIS\Include\WinVer.nsh
NSIS\Include\x64.nsh


Also this Plugin might be helpful:
http://nsis.sourceforge.net/GetVersi...ndows)_plug-in


Fantastic. These look like they should do exactly what I want.

Thank you very much.


Next time search the wiki, forum and look in the examples directory before asking questions as people may have aleready asked this sort of thing before, etc, etc...