Jump to content

@OSVersion help.


Recommended Posts

Guys i found out that @OSversion is the right thing to use. But im havein trouble figureing out how to use it. i´ve already read a few posts but non of them says what i need.

basically, i need to get the result of OSVersion and use it to redirect to an #include ( differents myfile.au3) depending of the windows version im running.

please HELP ME.

Link to comment
Share on other sites

[basically, i need to get the result of OSVersion and use it to redirect to an #include ( differents myfile.au3) depending of the windows version im running.

You can't do it with Includes but you can change parts of the code to do different things depending on the return value of @OSVersion.

It's a good day so here is an example >>

If @OSVersion = 'WIN_XP' Then
    MsgBox(4096, '', 'Do something for Windows XP.')
ElseIf @OSVersion = 'WIN_7' Then
    MsgBox(4096, '', 'Do something for Windows 7.')
Else
    MsgBox(4096, '', 'Do something for everything else.')
EndIf

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Okey, but the idea is to write 2 different codes a parent one and a child one.

the parent.. including the main code redirecting the script depending on the OS version....

im asking you to do this becaus i didnt want to have a super large code.. full of IF OSVersions ... btw. this is a autoit for testing IExplorer 8 in every single platform there is..

can u imagine how large would that code be ?

Link to comment
Share on other sites

can u imagine how large would that code be ?

No, because I don't code like that.

Edit: Aren't these two kind of related? >>

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

#Include <WinAPI.au3>
#include <GUIConstantsEx.au3>
Dim $runAllTests=False, $runFileTests=False, $runViewTests=False, $runEditTests=False, $runFavTests=False, $runToolTests=False, $runHelpTests=False, $runPrntTests=False, $runNavTests=False, $runPlugTests=False
GUICreate("IE6 Automated Testing", 320, 300)
GUICtrlCreateLabel("This Autoit Script automates the testing of nearly all UI components, Navigation and Plugins (Adobe Flash, Adobe Reader and Java).", 10, 10, 300, 50)
$allTestsCB = GUICtrlCreateCheckbox("Run All Tests", 10, 60, 200)
$fileCB = GUICtrlCreateCheckbox("File Menu Tests", 10, 80, 200)
$editCB = GUICtrlCreateCheckbox("Edit Menu Tests", 10, 100, 200)
$viewCB = GUICtrlCreateCheckbox("View Menu Tests", 10, 120, 200)
$favCB = GUICtrlCreateCheckbox("Favorites Menu Tests", 10, 140, 200)
$toolsCB = GUICtrlCreateCheckbox("Tools Menu Tests", 10, 160, 200)
$helpCB = GUICtrlCreateCheckbox("Help Menu Tests", 10, 180, 200)
$printCB = GUICtrlCreateCheckbox("Printing Menu Tests", 10, 200, 200)
$navCB = GUICtrlCreateCheckbox("Navigation Tests", 10, 220, 200)
$plugCB = GUICtrlCreateCheckbox("Plugins Tests", 10, 240, 200)
$okbutton = GUICtrlCreateButton("OK", 180, 260, 60)
$cancelbutton = GUICtrlCreateButton("Cancel", 245, 260, 60)
GUISetState(@SW_SHOW)
GUICtrlSetState ($allTestsCB, $GUI_CHECKED )
GUICtrlSetState ($fileCB, $GUI_CHECKED )
GUICtrlSetState ($editCB, $GUI_CHECKED )
GUICtrlSetState ($viewCB, $GUI_CHECKED )
GUICtrlSetState ($favCB, $GUI_CHECKED )
GUICtrlSetState ($toolsCB, $GUI_CHECKED )
GUICtrlSetState ($helpCB, $GUI_CHECKED )
GUICtrlSetState ($printCB, $GUI_CHECKED )
GUICtrlSetState ($navCB, $GUI_CHECKED )
GUICtrlSetState ($plugCB, $GUI_CHECKED )
While 1
  $msg = GUIGetMsg()
  Select
Case $msg = $cancelbutton
  Exit
Case $msg = $okbutton
   $uiCtrlState = GUICtrlRead($fileCB, 0)
   if $uiCtrlState = $GUI_CHECKED Then
    $runFileTests=True
   Else
    $runFileTests=False
   EndIf
   $uiCtrlState = GUICtrlRead($editCB, 0)
   if $uiCtrlState = $GUI_CHECKED Then
    $runEditTests=True
   Else
    $runEditTests=False
   EndIf
   $uiCtrlState = GUICtrlRead($viewCB, 0)
   if $uiCtrlState = $GUI_CHECKED Then
    $runViewTests=True
   Else
    $runViewTests=False
   EndIf
   $uiCtrlState = GUICtrlRead($favCB, 0)
   if $uiCtrlState = $GUI_CHECKED Then
    $runFavTests=True
   Else
    $runFavTests=False
   EndIf
   $uiCtrlState = GUICtrlRead($toolsCB, 0)
   if $uiCtrlState = $GUI_CHECKED Then
    $runToolTests=True
   Else
    $runToolTests=False
   EndIf
   $uiCtrlState = GUICtrlRead($helpCB, 0)
   if $uiCtrlState = $GUI_CHECKED Then
    $runHelpTests=True
   Else
    $runHelpTests=False
   EndIf
   $uiCtrlState = GUICtrlRead($printCB, 0)
   if $uiCtrlState = $GUI_CHECKED Then
    $runPrntTests=True
   Else
    $runPrntTests=False
   EndIf
   $uiCtrlState = GUICtrlRead($navCB, 0)
   if $uiCtrlState = $GUI_CHECKED Then
    $runNavTests=True
   Else
    $runNavTests=False
    EndIf
   $uiCtrlState = GUICtrlRead($plugCB, 0)
   If $uiCtrlState = $GUI_CHECKED Then
    $runPlugTests=True
   Else
    $runPlugTests=False
    EndIf

  GUIDelete()
  ExitLoop
Case $msg = $allTestsCB
  $ctrlState = GUICtrlRead($allTestsCB, 0)
  if $ctrlState = $GUI_CHECKED Then
   GUICtrlSetState ($allTestsCB, $GUI_CHECKED )
   GUICtrlSetState ($fileCB, $GUI_CHECKED )
   GUICtrlSetState ($editCB, $GUI_CHECKED )
   GUICtrlSetState ($viewCB, $GUI_CHECKED )
   GUICtrlSetState ($favCB, $GUI_CHECKED )
   GUICtrlSetState ($toolsCB, $GUI_CHECKED )
   GUICtrlSetState ($helpCB, $GUI_CHECKED )
   GUICtrlSetState ($printCB, $GUI_CHECKED )
   GUICtrlSetState ($navCB, $GUI_CHECKED )
   GUICtrlSetState ($plugCB, $GUI_CHECKED )
  ElseIf $ctrlState = $GUI_UNCHECKED Then
   GUICtrlSetState ($allTestsCB, $GUI_UNCHECKED )
   GUICtrlSetState ($fileCB, $GUI_UNCHECKED )
   GUICtrlSetState ($editCB, $GUI_UNCHECKED )
   GUICtrlSetState ($viewCB, $GUI_UNCHECKED )
   GUICtrlSetState ($favCB, $GUI_UNCHECKED )
   GUICtrlSetState ($toolsCB, $GUI_UNCHECKED )
   GUICtrlSetState ($helpCB, $GUI_UNCHECKED )
   GUICtrlSetState ($printCB, $GUI_UNCHECKED )
   GUICtrlSetState ($navCB, $GUI_UNCHECKED )
   GUICtrlSetState ($plugCB, $GUI_UNCHECKED )
  EndIf
  ;ExitLoop
    Case $msg = $GUI_EVENT_CLOSE
       Exit
  EndSelect
WEnd
GUIDelete()
Global $Paused
HotKeySet("{F7}","Terminate")
HotKeySet("{F5}", "Pause")
$ieWinStart = "about:blank - Microsoft Internet Explorer";
$iewin = "Windows Internet Explorer"
$ieFileOpen = "Open"
SplashTextOn("Beginning IE8 Tests", "Attempting to load IE8", 300, 100, -1, 0, 4)
if not Run(@ProgramFilesDir & "Internet Explorer 8iexplore.exe about:blank") Then
SplashOff()
;MsgBox(4096, "Error", "Path to IE6 not found. Make sure the IE6 Layer is Activated!")
Exit
EndIf
WinWaitActive ($iewin)
$ie6Handle = WinGetHandle($ieWinStart)
If @error Then
SplashOff()
    ;;MsgBox(4096, "Error", "Could not find the correct window")
EndIf
Opt("WinTitleMatchMode", 1)
SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...", 300, 100, -1, 0, 4)
Sleep(2000)
NavigateUsingAddr("www.google.com","window")
WinWait("Google")
Sleep(2000)
Send("!t")
Sleep(2000)
Send("o")
Sleep(2000)
SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Waiting Internet Options", 300, 100, -1, 0, 4)
WinWait("Internet Options")
SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Found Internet Options", 300, 100, -1, 0, 4)
Sleep(1000)
Send("!c")
Sleep(1000)
Send("{TAB 15}")
sleep(3000)
Send("{ENTER}")
Sleep(2000)
Send("{TAB 15}")
Sleep(3000)
Send("{RIGHT 2}")
sleep(1000)
Send("{TAB 1}")
sleep(1000)
Send("{UP 3}")
Sleep(1000)
Send("{TAB 5}")
Sleep(2000)
Send("{ENTER}")
Sleep(1000)
WinWait("Pop-up Blocker Settings")
Send("{TAB 6}")
Sleep(3000)
Send("{UP 2}")
Sleep(1000)
ControlCommand("Pop-up Blocker Settings", "Show &Information Bar when a pop-up is blocked.", 5417, "UnCheck")
Sleep(2000)
Send("{ENTER}")
Sleep(1000)
Send("{TAB 3}")
Sleep(500)
Send("{ENTER}")

If WinExists("Set Up Windows Internet Explorer 8")Then
Sleep(3000)
Send("{ESC}")
Sleep(2000)
EndIf
If WinExists("Internet Explorer")Then
  Send("!a")
  Sleep(2000)
  Send("!n")
  Sleep(2000)
EndIf
If WinExists("Internet Explorer Security")Then
Send("!s")
Sleep(2000)
Send("!a")
Sleep(2000)
EndIf
;Navigate to a site so there is something to print
NavigateUsingAddr("www.google.com", $ie6Handle)
Sleep(2000) ; give some time for the site to load.
Opt("WinTitleMatchMode", 2)
if $runFileTests Then
SplashTextOn("Running File Menu Tests", "File Menu Tests", 300, 100, -1, 0, 4)
FileMenuTests($ie6Handle)
SplashOff()
EndIf
if $runEditTests Then
SplashTextOn("Running Edit Menu Tests", "Edit Menu Tests", 300, 100, -1, 0, 4)
Sleep(3000)
EditMenuTests($ie6Handle)
SplashOff()
EndIf
if $runViewTests Then
SplashTextOn("Running View Menu Tests", "View Menu Tests", 300, 100, -1, 0, 4)
ViewMenuTests($ie6Handle)
SplashOff()
EndIf
if $runFavTests Then
SplashTextOn("Running Favorites Menu Tests", "Favorites Menu Tests", 300, 100, -1, 0, 4)
FavoritesMenuTests($ie6Handle)
SplashOff()
EndIf
if $runToolTests Then
SplashTextOn("Running Tools Menu Tests", "File Tools Tests", 300, 100, -1, 0, 4)
ToolsMenuTests($ie6Handle)
SplashOff()
EndIf
if $runHelpTests Then
SplashTextOn("Running Help Menu Tests", "Help Menu Tests", 300, 100, -1, 0, 4)
HelpMenuTests($ie6Handle)
SplashOff()
EndIf
if $runPrntTests Then
SplashTextOn("Running IE8 Printing Tests", "Running IE8 Print Function Tests", 300, 100, -1, 0, 4)
Sleep(1000)
;Navigate to a site so there is something to print
NavigateUsingAddr("www.google.com", $ie6Handle)
Sleep(5000) ; give some time for the site to load.
PrintingTest($ie6Handle)
Sleep(5000)
SplashOff()
EndIf
if $runNavTests Then
SplashTextOn("Running IE8 Navigation Tests", "Running IE8 Navigation Tests", 300, 100, -1, 0, 4)
NavigationTests($ie6Handle)
Sleep(5000)
SplashOff()
EndIf
If $runPlugTests Then
SplashTextOn("Running IE8 Plugins Tests", "Runnning IE8 Plugins Tests", 300, 100, -1, 0, 4)
PluginTests($ie6Handle)
Sleep(5000)
SplashOff()
EndIf
SplashTextOn("Running IE8 Tests", "Selected Tests are Completed!", 300, 100, -1, 0, 4)
Sleep(6000)
SplashOff()
WinClose($ie6Handle)
;DONE
Func NavigateUsingOpen($url)
Send("^o")
WinWait($ieFileOpen)
Sleep(3000)
Send($url, 1)
Sleep(3000)
Send("{ENTER}")
EndFunc
Func NavigateUsingAddr($url, $window)
Sleep(2000)
ControlFocus($window, "", "[CLASS:ComboBox; INSTANCE:1]")
Sleep(1000)
Send("!d")
Sleep(1000)
Send($url, 1)
Sleep(1000)
Send("{ENTER}")
Sleep(2000)
EndFunc
Func FileMenuTests($window)
 
    SplashTextOn("Running File Menu Tests", "File->New Tab", 300, 100, -1, 0, 4)
;File->New Tab
Send("^t")
WinWait("New Tab")
NavigateUsingAddr("altavista.com", $window)
EndLoad($window)
sleep(1000)
Send("^t")
WinWait("New Tab")
NavigateUsingAddr("wikipedia.org", $window)
    EndLoad($window)
sleep(1000)
Send("^t")
WinWait("New Tab")
NavigateUsingAddr("taringa.net", $window)
EndLoad($window)
sleep(1000)
Send("^t")
WinWait("New Tab")
NavigateUsingAddr("mercadolibre.com.ar", $window)
    EndLoad($window)
sleep(1000)
   While WinExists("Yahoo! Search - Web Search - Windows Internet Explorer")
  Send("^w")
  Sleep(3000)
WEnd

SplashTextOn("Running File Menu Tests", "File->Duplicate Tab", 300, 100, -1, 0, 4)
Sleep(1000)
;File->Duplicate Tab
Send("^k")
If WinExists("Google")then
   Sleep(1000)
   NavigateUsingAddr("altavista.com", $window)
   EndLoad($window)
   Else
 
 
    EndIf
  
If WinExists("Yahoo! Search - Web Search - Windows Internet Explorer")then
   Send("^k")
    EndIf

If WinExists("Yahoo! Search - Web Search - Windows Internet Explorer")then
   NavigateUsingAddr("wikipedia.org", $window)
   EndLoad($window)
Endif

If WinExists("Wikipedia - Windows Internet Explorer")then
   Send("^k")
    Endif

If WinExists("Wikipedia - Windows Internet Explorer")then
      NavigateUsingAddr("taringa.net", $window)
   EndLoad($window)
    EndIf

If WinExists("Taringa! - Inteligencia Colectiva - Windows Internet Explorer")then
   Send("^k")
    Endif

If WinExists("Taringa! - Inteligencia Colectiva - Windows Internet Explorer")then
  NavigateUsingAddr("mercadolibre.com.ar", $window)
  EndLoad($window)
    EndIf
  
If WinExists("Mercadolibre Argentina - Donde comprar y cender de todo   - Windows Internet Explorer")Then
    EndLoad($window)
    EndIf

While WinExists("Yahoo! Search - Web Search - Windows Internet Explorer")
  Send("^w")
  Sleep(3000)
WEnd

SplashTextOn("Running File Menu Tests", "File->New Window", 300, 100, -1, 0, 4)
ControlFocus($window, "", "[CLASS:ToolbarWindow32; INSTANCE:4]")
Sleep(2000)
;File->New Window
Send("^n")
   NavigateUsingAddr("www.google.com", $window)
   EndLoad($window)
This is the code

Link to comment
Share on other sites

It can't be done, anything in an #include statement is added to the script at run time, regardless of where you put it. It will add the code to your main script at the point that it finds the #include statement, so always put them at the top of the script or you WILL have problems 99.9% of the time. There's no way to conditionally include another file in AutoIt.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • Moderators

Your choices then, are to create two different FUNCTIONS and include them in your main script, or include both #include files, and call the correct function. Something like this.

Include 1
Func _XP
...
EndFunc

Include 2
Func _Win7
...
EndFunc

#include <include1.au3>
#include <include2.au3>

If @OSVersion = "Win_7" Then
   _Win7()
Else
   _XP()
EndIf
Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Another approach you can take is have multiple programs in your zip or installer. The program the user runs is a small stub that finds out what OS is running, if it's 64 bit or 32 bit etc.. then it picks the program to launch and quits. True you have to maintain 2 slave programs, but if you had 2 includes you'd have to maintain them anyway.

Link to comment
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
 Share

×
×
  • Create New...