Sign in to follow this  
Followers 0
coucou

Close Process or End Task

9 posts in this topic

Hi,

hkSFV is the simply the easiest, most intuitive and automatic way to create or check .SFV and .MD5 files.

Moreover its FREEWARE and only 227KB.

Here to Download

I'm trying to write a script for a complete silent install.

To install it silently

hkSFVsetup.exe /S

My problem is this program open the folder shortcuts Win-explorer (see enclosed image) at the end of the install and i can't get ride of it.

I've tried this

Run("hkSFVsetup.exe /S")
Opt("TrayIconHide", 1)
ProcessWait("explorer.exe")
ProcessClose("explorer.exe")
The system doesn't like closing explorer.exe process, it send an error message in addition to the folder shortcuts Win-explorer.

Is there anyhow to End Task of "%UserProfile%\Start Menu\Programs\hkSFV"

Any help will be wellcome

Regards

coucou

Share this post


Link to post
Share on other sites



Try WinKill().

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Try WinKill().

Cheers

Kurt

<{POST_SNAPBACK}>

I think he wants to close the window in the picture...

So maybe try WinWait() and then WinClose() for some unique text in the title...


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I think he wants to close the window in the picture... 

So maybe try WinWait() and then WinClose()  for some unique text in the title...

<{POST_SNAPBACK}>

yes, obviously your're right. I just wanted to give him a hint for the direction to look at.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

TNX Guys,

I tried this script... Sorry to tell you it doesn't solved my problem

Run("hkSFVsetup.exe /S")
WinWait("C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV", "", 30)
WinKill("C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV")

BTW here the AutoIt Windows Info of the window i want to close

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title:  C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV
Class:  CabinetWClass
Size:   X: -4   Y: -4   W: 1032 H: 746

>>>>>>>>>>> Mouse Details <<<<<<<<<<<
Screen: X: 761  Y: 91
Cursor ID:  2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB:    Hex: 0x7996DE   Dec: 7968478

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<
Size:       X: 49   Y: 64   W: 918  H: 22
Control ID: 41477
ClassNameNN:    ComboBox1
Text:       

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<
(1): 6 objects
(2): 4,41 KB
(3): My Computer

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<
C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV
C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV
6 objects
FolderView

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Any Help will be appreciated

coucou

Share this post


Link to post
Share on other sites

How about runwait instead of run, then WinWaitActive and WinClose?:

RunWait("hkSFVsetup.exe /S")
WinWaitActive("C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV")
Sleep(2000)
WinClose("C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV")

The Sleep(2000) is for debugging. I sometimes have to interject Sleep's in order to avoid skipped steps...


...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

TNX Guys,

I tried this script... Sorry to tell you it doesn't solved my problem

Run("hkSFVsetup.exe /S")

WinWait("C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV", "", 30)

WinKill("C:\Documents and Settings\Administrator\Start

use WinClose() and it will work. Interesting. Obviously, Explorer ignores WinKill().

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Runwait will not work... it pauses the script until the program is closed

but this works on my computer

$Window = run("explorer.exe")
WinWaitActive("")
sleep(5000)
WinClose("My Documents")

replace my documents with your location of

C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Wowww!!!

Well thought :)

Here the final.

I should add WinClose("My Documents") too, because it opened during the install

Run("hkSFVsetup.exe /S")
$Window = run("explorer.exe")
WinWaitActive("")
sleep(5000)
WinClose("C:\Documents and Settings\Administrator\Start Menu\Programs\hkSFV")
WinClose("My Documents")

TNX

coucou

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