Jump to content

Recommended Posts

Posted (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? :lmao:

#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 by Jan-Willem
Posted

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? :lmao:

#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

Hi,

ist there an error message? Can you post your *.bat, please

So 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

Posted

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!
Posted

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"

:lmao:

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
×
×
  • Create New...