I want to make an Autorun for a DVD to recognize Win as x32/x64. Is that possible?

2

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).

K0media

Posted 2015-10-28T03:35:16.030

Reputation: 195

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 – 2015-10-28T11:25:56.797

@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 – 2015-10-28T14:44:29.217

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 – 2015-10-28T14:47:44.123

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 – 2015-10-28T18:32:14.837

This question should be moved to stackoverflow.com, our site for coding questions. – RookieTEC9 – 2015-10-28T18:57:43.267

@RookieTEC9, OMG, it's so true! My apologies! I thought I was posting in StackOverflow, but I didn't pay enough attention... I'm so sorry about that! >_<" – K0media – 2015-10-29T03:07:56.247

Answers

1

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)

@ECHO OFF
wmic os get osarchitecture >tmp.txt
Findstr "32" tmp.txt
if  errorlevel 1 (start 32bit.exe & exit)
Goto 2
:2 
wmix os get osarchitecture >tmp.txt
Finstr "64" tmp.txt
If errorlevel 1 (start 64bit.exe & exit)

RookieTEC9

Posted 2015-10-28T03:35:16.030

Reputation: 936

Sorry I can't format this a s code, I'm on a phone AND it is impossible. – RookieTEC9 – 2015-10-28T18:51:38.937