Jan-Willem Posted February 9, 2006 Posted February 9, 2006 (edited) Help! This is my very first mini-script. And it works fine if I run it, it works fine if I compile it and run it. But when I run the compiled file from a batch (.bat) file it just hangs. It does not open 'UninstallThunderbird' When I do this manually, the script continues. What am I doing wrong? #include "include\file.au3" If FileExists("c:\Program Files\Mozilla Thunderbird\thunderbird.exe") Then Run ( 'UninstallThunderbird.exe' ) WinWait ( "Mozilla Thunderbird Uninstaller" ) ControlClick ( "Mozilla Thunderbird Uninstaller", "", "&Yes" ) EndIf Edited February 9, 2006 by Jan-Willem
Xenobiologist Posted February 9, 2006 Posted February 9, 2006 Help! This is my very first mini-script. And it works fine if I run it, it works fine if I compile it and run it. But when I run the compiled file from a batch (.bat) file it just hangs. It does not open 'UninstallThunderbird' When I do this manually, the script continues.What am I doing wrong? #include "include\file.au3"If FileExists("c:\Program Files\Mozilla Thunderbird\thunderbird.exe") Then Run ( 'UninstallThunderbird.exe' ) WinWait ( "Mozilla Thunderbird Uninstaller" ) ControlClick ( "Mozilla Thunderbird Uninstaller", "", "&Yes" )EndIfHi, ist there an error message? Can you post your *.bat, pleaseSo long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
CyberSlug Posted February 9, 2006 Posted February 9, 2006 When you Run a program, you usually need to put the complete path. If UninstallThunderbird is in the Mozilla Thunderbird folder, then you probably need to say Run("c:\Program Files\Mozilla Thunderbird\UninstallThunderbird.exe") Or you could say FileChangeDir("c:\Program Files\Mozilla Thunderbird\") Run ( 'UninstallThunderbird.exe' ) Probably best:FileChangeDir(@ProgramFilesDir) If FileExists(".\Mozilla Thunderbird\thunderbird.exe") Then Run ( '.\Mozilla Thunderbird\thunderbird.exe' ) WinWait ( "Mozilla Thunderbird Uninstaller" ) ControlClick ( "Mozilla Thunderbird Uninstaller", "", "&Yes" ) EndIf Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Jan-Willem Posted February 9, 2006 Author Posted February 9, 2006 It does not give any error. It is on pause. It just waits for the uninstall window to open. No file not found error
MHz Posted February 10, 2006 Posted February 10, 2006 It does not give any error. It is on pause. It just waits for the uninstall window to open. No file not found error Try changing the working directory to the uninstaller directory as below. FileChangeDir(@ProgramFilesDir & '\Mozilla Thunderbird') If FileExists("Thunderbird.exe") Then Run('Thunderbird.exe') WinWait("Mozilla Thunderbird Uninstaller") ControlClick("Mozilla Thunderbird Uninstaller", "", "&Yes") Else MsgBox(0, '', 'Thunderbird.exe not found in ' & @LF & @WorkingDir) EndIf If issues persist, then you may need to look for the uninstall string in: "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now