Sign in to follow this  
Followers 0
vnavna

X86 and X64 If Then Statement Adobe install

22 posts in this topic

#1 ·  Posted (edited)

I am trying to deploy a new Adobe Reader 10 to clients but now clients are running x86 XP and Windows 7 64bit. I need to make this so the code will detect the OS architecture then run the appropriate segments of the code. I am trying to run a script to skip lines if the OS architecture is x86 or x64. How would I go about doing this? I am unsure of where to put the select command to go to the appropriate line in the code.

If @OSArch = "X86"
If @OSArch = "X64" 
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A80000000002}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A80000000002} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81000000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81000000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81100000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81100000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81200000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81200000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81300000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81300000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A90000000001}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A90000000001} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A91000000001}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A91000000001} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A91000000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A91000000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A94000000001") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A94000000001 /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
    Exit
    Else
        Run("\\Server\Adobe Reader 10\Setup.exe")
    EndIf

If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A80000000002}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A80000000002} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81000000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81000000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81100000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81100000003} /qn","",@SW_HIDE)
    EndIf
    If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81200000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81200000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81300000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81300000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A90000000001}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A90000000001} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A91000000001}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A91000000001} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A91000000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A91000000003} /qn","",@SW_HIDE)
EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A94000000001") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A94000000001 /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
    Exit
    Else
        Run("\\Server\Adobe Reader 10\Setup.exe")
    EndIf
Edited by vnavna

Share this post


Link to post
Share on other sites



Try this:

If @OSArch = "X86" Then
;x86 installation
    
Else
;else x64 installation  

EndFunc

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Is this what you mean? I put in the code that you requested but I want to make sure that I put them in the correct locations.

If @OSArch = "X86" Then
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A80000000002}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A80000000002} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81000000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81000000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81100000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81100000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81200000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81200000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81300000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81300000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A90000000001}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A90000000001} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A91000000001}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A91000000001} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A91000000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A91000000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A92000000001}") Then
    Exit
    Else
If FileExists ("C:\Program Files\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A94000000001") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A94000000001 /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
    Exit
    Else
        Run("\\Server\Adobe Reader 10\Setup.exe")
    EndIf
     Else
    
    If @OSArch = "X64" Then
If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A80000000002}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A80000000002} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81000000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81000000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81100000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81100000003} /qn","",@SW_HIDE)
    EndIf
    If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81200000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81200000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81300000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81300000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A90000000001}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A90000000001} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A91000000001}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A91000000001} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A91000000003}") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A91000000003} /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A92000000001}") Then
    Exit
    Else
If FileExists ("C:\Program Files (x86)\Adobe\Reader 9.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A94000000001") Then
    RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A94000000001 /qn","",@SW_HIDE)
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
    Exit
    Else
        Run("\\Server\Adobe Reader 10\Setup.exe")
    EndIf
EndFunc

Share this post


Link to post
Share on other sites

Try this:

If @OSArch = "X86" Then
;x86 installation
    
Else
;else x64 installation  

EndFunc

Br,

UEZ

I am having trouble of finding out where to put this code along with the other If statements. It doesn't seem to work.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Then maybe you should focus on crochet.

Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

The main line of the code that fails would be the following. In an x86 Architecture the Program files (x86) doesn't exist so the code would run every time and in an x64 system the Program Files without the (x86) would not exist either so that would run again and again instead of exiting.

If FileExists ("C:\Program Files\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
    Exit
    Else
        Run("\\Server\Adobe Reader 10\Setup.exe")
    EndIf
If FileExists ("C:\Program Files (x86)\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
    Exit
    Else
        Run("\\Server\Adobe Reader 10\Setup.exe")

Share this post


Link to post
Share on other sites

trancexx

Thanks for your help.

Share this post


Link to post
Share on other sites

I could use just the two IF commands to do this. The reason all of the other lines are in there is because Adobe and their customization wizard for Adobe Reader always failed on uninstalling the previous versions of Reader but since version 9.1 I believe that they have finally fixed it and made it work. Still the paths are different on different OS architectures and I would like to make it so If @OSArch = "X86" it would run the appropriate x86 command and the same goes for IF @OSArch = "X64".

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

vnavna,

You are running the same install files regardless of architecture (as AdmiralAlex pointed out). UEZ gave you what you need, This is the structure:

;
;
;
_Main()

func _Main()

    If @OSArch = "X86" Then
    ;insert X86 files after this
        
    Else
    ;insert x64 files after this
    
    
    endif

EndFunc

If this is for professional use I would advise you to run this past someone experienced in your environment.

Good Luck,

kylomas

Edit: Shit, typing too slow, you guys got in under me!!

Edited by kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

I tried that earlier but it didn't work because Windows 7 x64 has 2 different Program Files paths. The normal C:\Program Files and C:\Program Files (x86). So I think by default that it goes to the x64 path of C:\Program Files.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

I tried that earlier but it didn't work because Windows 7 x64 has 2 different Program Files paths. The normal C:\Program Files and C:\Program Files (x86). So I think by default that it goes to the x64 path of C:\Program Files.

Then you are running x64 AutoIt. Use

#AutoIt3Wrapper_UseX64=n

to run x86.

Edit: Or just use the If if that's what you want, you know how to use it (If FileExists ("C:\Program Files\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81000000003}") Then), no one is stopping you!

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

vnavna,

You are running the same install files regardless of architecture (as AdmiralAlex pointed out). UEZ gave you what you need, This is the structure:

;
;
;
_Main()

func _Main()

    If @OSArch = "X86" Then
    ;insert X86 files after this
        
    Else
    ;insert x64 files after this
    
    
    endif

EndFunc

If this is for professional use I would advise you to run this past someone experienced in your environment.

Good Luck,

kylomas

Edit: Shit, typing too slow, you guys got in under me!!

How would you put in the second If FileExists statement without getting a Syntax error? I am not used to using functions. Example

If @OSArch = "X86" Then
If FileExists ("C:\Program Files\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
    Exit
    Else
        Run("\\Server\Adobe Reader 10\Setup.exe")
    EndIf

    If @OSArch = "X64" Then

Share this post


Link to post
Share on other sites

I am really missing the GOTO command. lol

Share this post


Link to post
Share on other sites

The issue that I am running into is that the next line is another IF fileExists statement which does not get skipped over and go to the If @OSArch = "X64" line. What am I missing?

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

What you need to do is: when the If condition for the 32bit and if it's false, the Else part will be the default (for 64bit in your case)

Think of an "IF/Else" like this: "IF" this part is true then end, ELSE this part is true because the "IF" part was false.

IF x86 Then

Do the check and uninstall of the versions for 32 bit OS

Else ; this part will be the default because x86 part is false

Do the check and uninstall of the 64 bit OS

Endif

For example

If @CPUArch = "X86" Then
    If FileExists(@ProgramFilesDir & "\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81100000003} /qn","",@SW_HIDE)
        EndIf
    If FileExists (@ProgramFilesDir & "\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81200000003}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81200000003} /qn","",@SW_HIDE)
        EndIf
    If FileExists (@ProgramFilesDir & "\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81300000003}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81300000003} /qn","",@SW_HIDE)
        EndIf

;Put the installer for 32 bit Adobe 10 here 

Else ;x64 part starts now since X86 was false otherwise it is skipped since the first section ran (it was a 32bit OS).

    If FileExists(@ProgramFilesDir & "\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81100000003} /qn","",@SW_HIDE)
       EndIf
    If FileExists (@ProgramFilesDir & "\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81200000003}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81200000003} /qn","",@SW_HIDE)
       EndIf
    If FileExists (@ProgramFilesDir & "\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81300000003}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81300000003} /qn","",@SW_HIDE)
      EndIf
;Put the installer for 64 bit Adobe 10 here
EndIf

;Put an installer that is OS independant here and remove the ones that are in the IF statment..

Oh, and use @ProgramFilesDir, that way it's more like a wildcard and you don't have to worry about the exact path, the Macro will take care of it.

Edited by Legacy99

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

What you need to do is: when the If condition for the 32bit and if it's false, the Else part will be the default (for 64bit in your case)

Think of an "IF/Else" like this: "IF" this part is true then end, ELSE this part is true because the "IF" part was false.

IF x86 Then

Do the check and uninstall of the versions for 32 bit OS

Else ; this part will be the default because x86 part is false

Do the check and uninstall of the 64 bit OS

Endif

For example

If @CPUArch = "X86" Then
    If FileExists(@ProgramFilesDir & "\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81100000003} /qn","",@SW_HIDE)
        EndIf
    If FileExists (@ProgramFilesDir & "\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81200000003}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81200000003} /qn","",@SW_HIDE)
        EndIf
    If FileExists (@ProgramFilesDir & "\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81300000003}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81300000003} /qn","",@SW_HIDE)
        EndIf

;Put the installer for 32 bit Adobe 10 here 

Else ;x64 part starts now since X86 was false otherwise it is skipped since the first section ran (it was a 32bit OS).

    If FileExists(@ProgramFilesDir & "\Adobe\Reader 10.0\Setup Files\{AC76BA86-7AD7-1033-7B44-AA0000000001}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81100000003} /qn","",@SW_HIDE)
       EndIf
    If FileExists (@ProgramFilesDir & "\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81200000003}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81200000003} /qn","",@SW_HIDE)
       EndIf
    If FileExists (@ProgramFilesDir & "\Adobe\Reader 8.0\Setup Files\{AC76BA86-7AD7-1033-7B44-A81300000003}") Then
        RunWait(@ComSpec & " /c " & "msiexec /x {AC76BA86-7AD7-1033-7B44-A81300000003} /qn","",@SW_HIDE)
      EndIf
;Put the installer for 64 bit Adobe 10 here
EndIf

;Put an installer that is OS independant here and remove the ones that are in the IF statment..

Oh, and use @ProgramFilesDir, that way it's more like a wildcard and you don't have to worry about the exact path, the Macro will take care of it.

I tried that before and it says that I am missing an EndIf with the "If @CPUArch = "X86" Then"

along with If FileExists(@ProgramFilesDir &"\path") doesn't work with the "C:\Program Files (x86)" path.

Edited by vnavna

Share this post


Link to post
Share on other sites

Here is a test code that I tried. The top one is the only one that will run because of running on a x64 bit PC. @ProgramFilesDir only works with the default x64 bit path of the files.

If FileExists(@ProgramFilesDir & "\activePDF\PrimoPDF") Then
    ; actual path "C:\Program Files\activePDF\PrimoPDF"
    Run("notepad")
    Sleep(1500)
    Send("PDF")
EndIf

If FileExists(@ProgramFilesDir & "\Alcohol Soft\Alcohol 120") Then
    ;Actual path "C:\Program Files (x86)\Alcohol Soft\Alcohol 120"
    Run("notepad")
    Sleep(1500)
    Send("Alcohol")
EndIf

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0