So I've got this program which a setup is designed for x32 systems and the other for x64. Do I need to create a program for that or can I simply make the Autorun.inf recognize which one should be installed? Or do I need to create a batch file for that?

Obs.: The program is separated in 2 folders. I.e. Program (x32) and Program (x64).

  • If you want to automatically start your application then you need a launcher program which uses logic to determine which version of the executable to start. – Ramhound Oct 28 '15 at 11:25
  • @Ramhound, I see. I'd do that if I knew some programming, but I think I'll pass. But thanks for the notice. Maybe C++ or something? – K0media Oct 28 '15 at 14:44
  • I took this question as you were the author of a program with two versions and you wanted to automatically run the correct program when the disk was ran. If you are not the author of the program, then the author has to offer this functionality, so your question is not clear given this no revelation. – Ramhound Oct 28 '15 at 14:47
  • You can make an auto run file that will open the batch file as a silent window that will check if you are running a 32 bit or 64 bit version. – RookieTEC9 Oct 28 '15 at 18:32
  • This question should be moved to stackoverflow.com, our site for coding questions. – RookieTEC9 Oct 28 '15 at 18:57

No, it is impossible to do so with an AUTORUN.INF file. According to https://msdn.microsoft.com/en-us/library/aa969327.aspx , there is no command to do this. You will have to do this with a batch file.

You can do this (not tested though so don't scream at me)

wmic os get osarchitecture >tmp.txt
Findstr "32" tmp.txt
if  errorlevel 1 (start 32bit.exe & exit)
Goto 2
wmix os get osarchitecture >tmp.txt
Finstr "64" tmp.txt
If errorlevel 1 (start 64bit.exe & exit)
| improve this answer | |
  • Sorry I can't format this a s code, I'm on a phone AND it is impossible. – RookieTEC9 Oct 28 '15 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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