ur Posted February 20, 2017 Posted February 20, 2017 My exe should run in both 32 and 64 OS, so I am compiling it as 32 bit exe. But in 64 bit, it is picking C:\Program files (x86) for @ProgramFilesDir. Can anyone suggest how to use C:\Program files\ in both 32 and 64 bit OS.
jguinch Posted February 20, 2017 Posted February 20, 2017 (edited) There are multiple ways for this. Here is one : Func _GetNativeProgramFilesDir() Local $sNativeProgramFilesDir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramW6432Dir") Return ( @error ? @ProgramFilesDir : $sNativeProgramFilesDir) EndFunc can also be done with EnvGet or else... Edited February 20, 2017 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now