MSFN Forum: How to kill a running Programm - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to kill a running Programm Rate Topic: -----

#1 User is offline   mediapla 

  • Junior
  • Pip
  • Group: Members
  • Posts: 76
  • Joined: 08-November 04

Posted 08 December 2005 - 05:25 PM

I have a little problem with my unattended setup. I use a EXE to play
MP3 Files during GUI Setup, beginning at T32. But if then XP Setup reboots (T0) there is A BSOD, if
i use a configuration with the damned Soundmax-driver. I must switch off and on the
computer and and the istallation is still running with GUI RunOnce
If i cancel the MP3 playing EXE, no error. So i thought : if it is possible to close the program just
a little moment before XP reboots, i got no error and i have FULL unattended setup. (Without pressing
the power button) Is it possible to run a AUTOIT Script to close the playing file ?
But its only with Soundmax Audio Chips, no problem at Realtek AC97 or HDA Devices.
I also tried out Media Player Classic at T12, same Problem BSOD at Reboot.


#2 User is offline   druiddk 

  • Member
  • PipPip
  • Group: Members
  • Posts: 204
  • Joined: 30-November 05

Posted 08 December 2005 - 06:20 PM

You can use the killtask.exe (This has been covered in the forums before).

#3 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 08 December 2005 - 08:46 PM

Here is a vbs script that will taskkill the window is hidden.
Save As Tkill.VBS
Red text is where you place the app name

Quote

Const Hidden = 0, Normal = 1, Min = 2 '''' SET THE SIZE OF THE WINDOW
Dim Act : Set Act = CreateObject("Wscript.Shell")
Act.Run("%comspec% /c TASKKILL /F /T /IM PLACE_APP_NAME_HERE"),Hidden,True


#4 User is offline   Bezalel 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 591
  • Joined: 11-October 05

Posted 08 December 2005 - 09:15 PM

The question that still needs to be answered is how do you know when to kill the process. My solution would be to start a second process that monitors all windows for the countdown window and kills the player process when it sees the countdown window. (I'm not going to write a code sample for this one but I hope my idea helps you.)

#5 User is offline   druiddk 

  • Member
  • PipPip
  • Group: Members
  • Posts: 204
  • Joined: 30-November 05

Posted 09 December 2005 - 04:13 AM

@gunsmokingman:

AppName, Is this the WindowTitle your referring to? or the filename.exe?

#6 User is offline   MCT 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3,288
  • Joined: 19-May 04

Posted 09 December 2005 - 04:42 AM

yes the filename

example

it would be explorer.exe

#7 User is offline   druiddk 

  • Member
  • PipPip
  • Group: Members
  • Posts: 204
  • Joined: 30-November 05

Posted 09 December 2005 - 04:56 AM

OK! Thanks for clarifying that :)

#8 User is offline   BoardBabe 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,419
  • Joined: 04-October 04

Posted 09 December 2005 - 06:11 AM

I would use xp's tskill.exe cause I don't have no killtask.exe ;)

This post has been edited by BoardBabe: 09 December 2005 - 06:12 AM


#9 User is offline   mediapla 

  • Junior
  • Pip
  • Group: Members
  • Posts: 76
  • Joined: 08-November 04

Posted 09 December 2005 - 04:40 PM

...but how will I (or the Task-killer Program) know, that the GUI Setup will reboot ? I would make a AutoIt Script like " if WinExists ( "Windows XP Home Edition Setup" , "ungefähr 1 Minute" ) then" (-its a german version), but i dont know, if the title and/or the windows text is the right one. I would use AutoIT to close the self playing MP3.
The File i use is a MP3toEXE converted MP3 file, its 15min, starts at T32 and the program loops...so it plays and plays..and install time is various from machine to machine. It should close/kill this program just a moment befor the setup reboots the computer.
I hope you can understand my problem....

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy