mediapla Posted December 13, 2005 Share Posted December 13, 2005 I need help. I must close (without user input) a Programm, running silently under XP unattended Setup. It should cancel the programm just a moment befor the XP setup reboots. Have tried some things with AutoIT, but it doesnt work. The cancel-operation MUST run in unattend mode.... any idea ? Link to comment Share on other sites More sharing options...
Ghost82 Posted December 13, 2005 Share Posted December 13, 2005 try using: Taskkill /f /im "program.exe"use taskkill /? for more info. Link to comment Share on other sites More sharing options...
gunsmokingman Posted December 13, 2005 Share Posted December 13, 2005 Here is a VBS script that taskkills and supresses the cmd windowConst Hidden = 0, Normal = 1, Min = 2 Dim Act : Set Act = CreateObject("Wscript.Shell") Act.Run("%comspec% /c TASKKILL /F /T /IM NAME_OF_APP_HERE"),Hidden,true Link to comment Share on other sites More sharing options...
mediapla Posted December 13, 2005 Author Share Posted December 13, 2005 How does taskkill know, that XP timeline is < 1 Minute, that z´the setup wants to reboot ? Thats the problem. The program must/should run through the XP GUI setup. Is a multimedia application, a 2-exe converted mp3. Normally no problem, but if i had some series of mainboards with integrated sounmax soundchips, at the reboot i got a BSOD, the computer hang. Other souncards/chips work fine, XP setup kills the process at the reboot. Link to comment Share on other sites More sharing options...
Ghost82 Posted December 13, 2005 Share Posted December 13, 2005 run it as the last line of you're script (well almost last line, the last being the reboot command...) Link to comment Share on other sites More sharing options...
mediapla Posted December 13, 2005 Author Share Posted December 13, 2005 i dont know if you understand what i mean ( I know, my english isnt the best... )The File plays music - it fine to have a good sound while the stupid XP Setup is running - and loops.So i cant make a command script. But i thougt, its possible to use AutioIT - that looks at the active windowtext and can call a external programm or a internal function. Like This:Winwait ("Windows XP Home Edition Setup", "Netzwerkkomponenten") <-this works fine sleep(50000)RunWait (@scriptDir & "\film.exe")SoundSetWaveVolume(70)Sleep(1000)Run("1.exe")ProcessSetPriority("1.exe", 4)WinWait("1.exe","Previous")ControlClick("1.exe","Previous","Button7")ControlClick("1.exe","Previous","Button9")if WinExists ( "Windows XP Home Edition Setup" , "1 Minute" ) then <- this line doesnt work ;ControlClick("1.exe", "Exit EXEmp3","Button10") <- this lines should close the application, doesnt work WinKill ( "1.exe") EndIfThats my problem. I use this on varios Computers, some are slow, some are fast. So i dont know, how long the 1.exe(mp3) plays. On a faster computer, XP reboots at the playing time. And thats no problem,but if i use a configuration with Soundmax - BSOD. Link to comment Share on other sites More sharing options...
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