weszzer Posted February 3, 2015 Share Posted February 3, 2015 Guys, I really need your help. I am having a problem on the "processclose" on Windows 2008 R2. The code below is working great on Windows 7 but not on the Windows 2008 Basically, the extract.exe is open or run by cmd.exe, after certain period of time the extract.exe will exit (automatically), then after 5sec the cmd will exit, followed by a message " File extracted" which will close after 5sec.. $PID_Check=ProcessWaitClose("extract.exe"); Pause script execution until the given process does not exist if $PID_Check = 1 Then ;1= not exist Sleep(5000) ProcessClose("cmd.exe") Sleep(3000) MsgBox(0, "", "File extracted",5); message box will close after 5sec EndIf I can't figure out what the problem is, I tried on Window 7 but no problems. I'm on domain and I'm using the same username and I able to run the code.. Is there any other code I can use to close the cmd exe. if the cmd.exe did not close, on the next run it will not execute the extract.exe since the cmd.exe is still running. This is unattended run using task scheduler. Thank you very much. Link to comment Share on other sites More sharing options...
JohnOne Posted February 3, 2015 Share Posted February 3, 2015 Is the command prompt an admin session on one of the? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
weszzer Posted February 3, 2015 Author Share Posted February 3, 2015 (edited) Is the command prompt an admin session on one of the? Hi JohnOne, sorry didn't get what you mean. but I'm using a user with admin rights. Cheers Edited February 3, 2015 by weszzer Link to comment Share on other sites More sharing options...
JohnOne Posted February 3, 2015 Share Posted February 3, 2015 On win 7 (at least), just because user is admin, not all programs are launched as admin. Try a debug by adding #RequireAdmin to script. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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