zYx Posted July 7, 2016 Share Posted July 7, 2016 (edited) Hi, I tried to find something regarding my issue, but I couldn't. My scripts that were usually running fine on my previous Windows 7, are not running properly on my newly installed Windows 10 Pro. Sleep(14000) Run("C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe") Sleep(5000) Run("C:\Program Files\Core Temp\Core Temp.exe", "" ,@SW_MINIMIZE) Sleep(5000) WinSetState("Core Temp 1.1", "", @SW_MINIMIZE) Sleep(1500) Run("C:\Users\zyxsc\Documents\LCDHost\bin\LCDHost.exe","", @SW_MINIMIZE) Sleep(15000) WinClose("zyx - LCDHost") Sleep(10000) Run("C:\Program Files\Everything\Everything.exe -startup") So what happens is: MSIAfterburner does not open, Core Temp doesn't open, LCDHost.exe does open fine and closes the window fine, Everything.exe does not open. Any idea why? Edited July 7, 2016 by zYx Link to comment Share on other sites More sharing options...
SadBunny Posted July 7, 2016 Share Posted July 7, 2016 The obvious first question is do those files exist in those locations and do they work if you run those commands manually? Second question: check the process manager, are the processes really not started? Third, check the result and errorlevel of the Run commands (as in $pid = Run("something") and then ConsoleWrite($pid & @CRLF & @error & @CRLF ) ) and see whether you get a pid and/or a non-zero @error. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
zYx Posted July 7, 2016 Author Share Posted July 7, 2016 (edited) Hi, yes, all files do exist, task manager doesn't show those apps, so no, they are really not running. I'm not sure how to follow your third advise do I just add $pid = in front of Run? I did this: Sleep(1000) $pid = Run("C:\Program Files\Core Temp\Core Temp.exe", "" ,@SW_MINIMIZE) ConsoleWrite($pid & @CRLF & @error & @CRLF ) but nothing really happens.. Could it be something to do with permission level to Program Files folders? Edited July 7, 2016 by zYx Link to comment Share on other sites More sharing options...
SadBunny Posted July 7, 2016 Share Posted July 7, 2016 $pid = Run("notepad.exe") MsgBox(64, "notepad.exe pid:", $pid) $pid = Run("doesntexist.exe") MsgBox(64, "doesntexist.exe pid:", $pid) The first one will (or rather should, if notepad.exe is run properly) show you a non-zero PID in the MsgBox, the second one will show a PID of 0 as the process failed to launch. The permissions, sure, could be... For good measure, try putting #RequireAdmin on top of your script, run it and allow the process elevation. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
iamtheky Posted July 7, 2016 Share Posted July 7, 2016 put these two lines at the top #include <WinAPIFiles.au3> _WinAPI_Wow64EnableWow64FsRedirection(FALSE) ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
zYx Posted July 7, 2016 Author Share Posted July 7, 2016 (edited) 11 minutes ago, iamtheky said: #include <WinAPIFiles.au3> _WinAPI_Wow64EnableWow64FsRedirection(FALSE) This didn't really work but this did: 13 minutes ago, SadBunny said: #RequireAdmin In relation to this: 13 minutes ago, SadBunny said: $pid = Run("notepad.exe") MsgBox(64, "notepad.exe pid:", $pid) $pid = Run("doesntexist.exe") MsgBox(64, "doesntexist.exe pid:", $pid) I added MSI Afterburner locaton, but kept getting popup error with wrong PID etc.. Edited July 7, 2016 by zYx Link to comment Share on other sites More sharing options...
SadBunny Posted July 7, 2016 Share Posted July 7, 2016 1 minute ago, zYx said: kept getting popup error with wrong PID etc.. What do you mean? What kind of popup error and how is the PID wrong? Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
iamtheky Posted July 7, 2016 Share Posted July 7, 2016 (edited) UAC or redirection, it's generally that coinflip on upgrade/architecture issues. glad its not the issue, but If dancing between (x86) and x64 directory structure i would still recommend it. Edited July 7, 2016 by iamtheky posting/editing race condition ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
zYx Posted July 7, 2016 Author Share Posted July 7, 2016 (edited) 2 minutes ago, SadBunny said: What do you mean? What kind of popup error and how is the PID wrong? $pid = Run("C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe"") MsgBox(64, "C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe" pid:", $pid) $pid = Run("notepad.exe") MsgBox(64, "notepad.exe pid:", $pid) $pid = Run("doesntexist.exe") MsgBox(64, "doesntexist.exe pid:", $pid) Edited July 7, 2016 by zYx Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 7, 2016 Moderators Share Posted July 7, 2016 You have double, double quotes on the end of your run command. The error message is telling you just what is wrong. algiuxas 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
iamtheky Posted July 7, 2016 Share Posted July 7, 2016 edited above as you posted: looks like your run command has a double set of "" at the end, but only one at the beginning. algiuxas 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
SadBunny Posted July 7, 2016 Share Posted July 7, 2016 Change the end of that first line from MSIAfterburner.exe"") to MSIAfterburner.exe") Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
SadBunny Posted July 7, 2016 Share Posted July 7, 2016 Haha... "if you don't know it by now, you will never never never know it, oooh ohohohoooh" Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
zYx Posted July 8, 2016 Author Share Posted July 8, 2016 (edited) Sorry guys, but that was a typo and it wasn't a problem. #RightsAdmin, sorry -> #RequiresAdmin did help though. Edited July 9, 2016 by zYx Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 8, 2016 Moderators Share Posted July 8, 2016 @zYx I am assuming, in case someone should come upon this thread in a future search, you mean #RequireAdmin zYx 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
MattHiggs Posted July 8, 2016 Share Posted July 8, 2016 Try using "shellexecute" instead of "run". Run is meant more for executables that you would open in the "run" prompt when you press "win key + R". Kind of like Ipconfig,exe or something similar. If you must run the application using the "run" command, precede it with the @Comspec macro to call the command prompt to open the file. An example would be as follows: Run ( @comspec & " /c yourexecutablefile.exe", "Path_to_directory_containing_executable" ) zYx 1 Link to comment Share on other sites More sharing options...
Developers Jos Posted July 8, 2016 Developers Share Posted July 8, 2016 @MattHiggs, You did see the OP stated it is working after adding #RequireAdmin ? zYx 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
zYx Posted July 9, 2016 Author Share Posted July 9, 2016 (edited) 19 hours ago, JLogan3o13 said: @zYx I am assuming, in case someone should come upon this thread in a future search, you mean #RequireAdmin Sorry, yes :/ I corrected it now. 17 hours ago, MattHiggs said: Try using "shellexecute" instead of "run". Run is meant more for executables that you would open in the "run" prompt when you press "win key + R". Kind of like Ipconfig,exe or something similar. If you must run the application using the "run" command, precede it with the @Comspec macro to call the command prompt to open the file. An example would be as follows: Run ( @comspec & " /c yourexecutablefile.exe", "Path_to_directory_containing_executable" ) Thanks, I will use this at some point in future, I'm sure :] Edited July 9, 2016 by zYx 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