Ticket #879: Display AU3 default.au3

File Display AU3 default.au3, 1.9 KB (added by Jpm, 16 years ago)
Line 
1; ----------------------------------------------------------------------------
2;
3; AutoIt Version: 3.2.1.13
4; Author:         JPM
5;
6; Script Function:
7;       Display AutoIt default Running release.
8;
9; ----------------------------------------------------------------------------
10
11; Script Start - Add your code below here
12
13Opt("MustDeclareVars",1)
14Local $InstallDir = RegRead("HKLM\Software\AutoIt v3\AutoIt","InstallDir")
15If $InstallDir = "" Then $InstallDir = RegRead("HKLM\Software\Wow6432Node\AutoIt v3\AutoIt","InstallDir")
16If $InstallDir = "" Then
17        MsgBox(0,'Error', 'Cannot find AutoIt Installation directory')
18        Exit
19EndIf
20
21;If StringInStr(RegRead("HKLM\Software\Classes\AutoIt3Script\Shell\Run\Command",""),"beta") Then
22If StringInStr(RegRead("HKCR\.au3",""),"Beta") Then
23    Local $AutoItEnv = "Beta " & FileGetVersion($InstallDir & '\beta\AutoIt3.exe') & _
24                                        " (" & StringLeft(FileGetTime($InstallDir & '\beta\AutoIt3.exe',0,1),4) & _
25                                        "/" & StringMid(FileGetTime($InstallDir & '\beta\AutoIt3.exe',0,1),5,2) & _
26                                        "/" & StringMid(FileGetTime($InstallDir & '\beta\AutoIt3.exe',0,1),7,2) & ")"
27Else
28    Local $AutoItEnv = "Release " & FileGetVersion($InstallDir & '\AutoIt3.exe') & _
29                                        " (" & StringLeft(FileGetTime($InstallDir & '\AutoIt3.exe',0,1),4) & _
30                                        "/" & StringMid(FileGetTime($InstallDir & '\AutoIt3.exe',0,1),5,2) & _
31                                        "/" & StringMid(FileGetTime($InstallDir & '\AutoIt3.exe',0,1),7,2) & ")"
32EndIf
33
34If @AutoItX64 Then
35        Local $AutoItX64 = "X64 "
36Else
37        Local $AutoItX64 = "X86 "
38EndIf
39Local $Compiled = ""
40If @Compiled Then $Compiled = " Compiled"
41Local $OsServicePack=""
42If @OSServicePack Then $OsServicePack = "/" & @OSServicePack
43Local $SystemEnv = "Running under :" & @CRLF & @CRLF & @OSVersion & $OsServicePack & " (" & @OSArch & ")" & @CRLF & @TAB & "CPUArch=" & @CPUArch
44
45MsgBox(0,"AutoIt default", $AutoItX64 & $AutoItEnv & $Compiled & _
46                                                         @CRLF & @CRLF & $SystemEnv _
47                                        ,5)