Sign in to follow this  
Followers 0
TonyP

Exiting a taskbar program

3 posts in this topic

Okay, I did a search for this but came up empty... I am running TrueCrypt from a flash drive and I have it autorun when it is plugged it. For functionality sake I have TC run in background mode which puts a TC icon in the taskbar. I was wondering how I can exit that? I have a script that is really simple it just unmounts the partition, but I can't figure out how to exit out of the taskbar icon.

Here are my scripts:

Start.au3

Run("TrueCrypt\TrueCrypt.exe /q /e /m rm /v encryption2gb")

Stop.au3

Run("TrueCrypt\TrueCrypt.exe /d /q")

The TC command line options don't have anything for exiting that I could see... So is there a way AutoIt can exit a taskbar app?

Thanks

Share this post


Link to post
Share on other sites



ProcessClose(TrueCrypt.exe) ???

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

ProcessClose(TrueCrypt.exe) ???

Okay, thanks, that works perfectly... Just to be on the safe side would I want to put a If Else in this... For example:

Run("TrueCrypt\TrueCrypt.exe /d /q")
If ProcessExists("TrueCrypt.exe") Then
 ProcessClose("TrueCrypt.exe")
 Else 
     Exit
EndIf

Edit: Opps, had forgotten the EnfIf

Edited by xenon2050

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0