Forum Discussion
QAPitt
14 years agoOccasional Contributor
FYI, I changed your code slightly because on a 64 bit environment when the Else statement took place it was changing "Program Files (x86)" to "Program Files (x86) (x86)" etc.
Here is the final version of the code I came up with:
Sub ChangeASaMenuPath ()
Dim Application
Dim os64bits
Dim aSaMenu
os64bits = Sys.OSInfo.Windows64bit
Set aSaMenu = TestedApps.aSaMenu
If (os64bits = True) And aSaMenu.Path = "C:\Program Files\aSa\CI\" Then
aSaMenu.Path = Replace(aSaMenu.Path,"Program Files","Program Files (x86)")
End If
If (os64bits = False) And aSaMenu.Path = "C:\Program Files (x86)\aSa\CI\" Then
aSaMenu.Path = Replace(aSaMenu.Path,"Program Files (x86)","Program Files")
End If
End Sub
Thanks again for all the help.
Here is the final version of the code I came up with:
Sub ChangeASaMenuPath ()
Dim Application
Dim os64bits
Dim aSaMenu
os64bits = Sys.OSInfo.Windows64bit
Set aSaMenu = TestedApps.aSaMenu
If (os64bits = True) And aSaMenu.Path = "C:\Program Files\aSa\CI\" Then
aSaMenu.Path = Replace(aSaMenu.Path,"Program Files","Program Files (x86)")
End If
If (os64bits = False) And aSaMenu.Path = "C:\Program Files (x86)\aSa\CI\" Then
aSaMenu.Path = Replace(aSaMenu.Path,"Program Files (x86)","Program Files")
End If
End Sub
Thanks again for all the help.