AutoIT script to check if file exist then install application


Autoitlogo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
;==========================================================================
;
; NAME: outlook_addon.au3
;
; AUTHOR: John Sorensen
;
; COMMENT:
; Install an outlook 2003 specific addon using AutoIT.
;This will first check to see if the addon
; already exists and if not will check if outlook 2003
;exexcutable exest then will install showing a
; install showing progress. Edit the script as needed
;to include your own file and folder names.
;
;==========================================================================

;check if addon folder already installed, if so then exit

If FileExists(@ProgramFilesDir & "\\Outlookaddon\addon") Then
Exit
EndIf

; check for exestince of Outlook 2003 executable and if found install addon

If FileExists(@ProgramFilesDir & "\Microsoft Office\OFFICE11\OUTLOOK.EXE") Then

msgbox (48, "Starting Outlook Addon Installation", "Please DO NOT Touch Keyboard or Mouse", 3)

; begin progress dialogue box

ProgressOn ("Please wait, DO NOT Touch Keyboard or Mouse", "Starting Install", "0% Complete", 20, 20, 16)
sleep (100)

For $i = 1 to 9 step 1
Sleep(10)
ProgressSet ( $i, $i & "% Complete")
Next

; run addon setup or whatever the executable name is

run ("addon.exe")
WinWaitActive ("Welcome")

ProgressSet (10, "15% Complete", "Installing Addon for Outlook")

ProgressSet (15, "15% Complete", "Installing Addon for Outlook")

sleep (100)

send ("!n")

WinWaitActive ("Choose Destination Location")

send ("!n")

ProgressSet (30, "20% Complete", "Installing Addon for Outlook")

ProgressSet (40, "30% Complete", "Installing")

WinWaitActive ("Select Components")

send ("!n")

ProgressSet (50, "40% Complete", "Installing Addon for Outlook")
sleep (500)

ProgressSet (60, "40% Complete", "Installing Addon for Outlook")

ProgressSet (70, "40% Complete", "Installing Addon for Outlook")

ProgressSet (80, "50% Complete", "Installing Addon for Outlook")

For $i = 81 to 99 step 1
Sleep(50)
ProgressSet ( $i, $i & "% Complete")
Next

WinWaitActive ("Setup Complete")
send ("{ENTER}")

ProgressSet (100, "100% Complete", "Complete")
sleep(1500)

; end progress dialogue box

ProgressOff()

msgbox (0, "Install", " Addon Installation Complete", 3)

Exit

Else ; if Office11/OUTLOOK.EXE does not exist then exit
MsgBox(4096,"Installation Aborted", "Installation Aborted. Outlook 2003 Required",3)
Exit

Endif




You can leave a response, or trackback from your own site.


Further Reading
    None Found




One Response to “AutoIT script to check if file exist then install application”

  1. [...] AutoIT script to check if file exist then install application | AdminPost …Dec 17, 2009 … Install an outlook 2003 specific addon using AutoIT. ;This will first check to see if the addon ; already exists and if not will check if outlook 2003 … [...]

Leave a Reply

Anti-Spam Quiz:

Twitter Delicious Facebook Digg Stumbleupon Favorites More
342 queries in 4.995 seconds.