#Include <GuiTreeView.au3>
$title = "VLC media player 1.1.2 Setup"
run("vlc-1.1.2-win32.exe")
winwait("Installer Language", "Please select a language.")
controlclick("Installer Language", "Please select a language.", "OK")
winwait($title, "Welcome")
controlclick($title, "Welcome", "&Next >")
winwait($title, "License")
controlclick($title, "License", "&Next >")
winwait($title, "Choose Components")
; more reliable than sending arrow & space keystrokes
$hWnd = ControlGetHandle($title, "Choose Components", _
"[CLASS:SysTreeView32]")
; uncheck
$desktopItem = _GUICtrlTreeView_FindItem($hWnd, "Desktop Shortcut")
_GUICtrlTreeView_ClickItem($hWnd, $desktopItem)
; uncheck
$filetypeItem = _GUICtrlTreeView_FindItem($hWnd, "File type associations")
_GUICtrlTreeView_ClickItem($hWnd, $filetypeItem)
controlclick($title, "Choose Components", "&Next >")
winwait($title, "Choose Install Location")
controlclick($title, "Choose Install Location", "&Install")
winwait($title, "Completing the VLC")
controlcommand($title, "Completing the VLC", "&Run VLC media player 1.1.2", _
"uncheck")
controlclick($title, "Completing the VLC", "&Finish")
; get rid of first run nag
DirCreate("C:\Users\Default\AppData\Roaming\vlc")
FileCopy("vlcrc", "C:\Users\Default\AppData\Roaming\vlc", 1)



