Jump to content

[SOLVED]Run command stopped execution


Recommended Posts

Hi friends,

The Run command on my machine suddenly stopped execution.

Anyone of you facing the same issue?

#include <AutoItConstants.au3>
#include <FileConstants.au3.>
#RequireAdmin
$ExeName = FileOpenDialog("Select AutoIt executable", @ScriptDir & "\", "(*.exe)", $FD_FILEMUSTEXIST)
If not @error Then
    If FileExists($ExeName) Then
        $iPID = Run($ExeName, "", @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD)
        If @error Then
            msgbox(0,"Failed", "Failed execution with @error: " & @error)
        EndIf

    Else
        Msgbox(0,"", "File does not exist")
    EndIf

EndIf

The above code always fails to execute the executable file. It was working perfect and stopped working now.

I have tried adding the files and folders to windows defender exclusion list and uninstalling the anti virus but still no luck.

OS: Windows 10 - 64 bit

Please help.

 

Edited by PoojaKrishna
Link to comment
Share on other sites

  • Moderators

Uhhhhh, you have it set to @SW_HIDE. Are you sure it is not running the exe? It works fine for me (when I remove the hide of course)

"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

24 minutes ago, JLogan3o13 said:

Uhhhhh, you have it set to @SW_HIDE. Are you sure it is not running the exe? It works fine for me (when I remove the hide of course)

Yes, I'm sure it is not working as I always get the message box:

---------------------------
Failed
---------------------------
Failed execution with : 1
---------------------------
OK   
---------------------------
 

Link to comment
Share on other sites

  • Moderators

And this is on any executable..if you browse to notepad.exe or cmd.exe is is failing as well?

"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

11 minutes ago, JLogan3o13 said:

And this is on any executable..if you browse to notepad.exe or cmd.exe is is failing as well?

Tested for that only now, and found it working for all executable other than executable from a particular path : D:\Pooja Projects.

 

 

Link to comment
Share on other sites

Is D: a network drive?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

3 minutes ago, BrewManNH said:

Is D: a network drive?

No, it is not a network drive. It is working for all other folders on D: other than the mentioned folder.

It was working perfect till last day and suddenly stopped working today with no change in my codes or system settings.

Edited by PoojaKrishna
Link to comment
Share on other sites

11 minutes ago, Earthshine said:

doesn't look look like an AutoIt problem then, guess your antivirus doesn't like that exe

Yes, may be. But I uninstalled the antivirus and restarted the machine.

8 minutes ago, AdamUL said:

It could be related to the following with Windows 10 issue.  

It is not a shared folder too.

I can move the files to an another folder to make it work for now.

 

 

Edited by PoojaKrishna
Link to comment
Share on other sites

i am having an issue where the UDF zips all report virus, but there is none. sigh. Latest Win 10, 3 real computers and 3 virtual, all same....

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

7 hours ago, Deye said:

PoojaKrishna,

What if you first backup or rename the folder .. \user\AppData\Local\AutoIt v3
so it doesn't exist  and  try again

Deye,

Tried but no help. But the system does not allow me to rename the folder D:\Pooja Projects, even if no files of the folder are open. Seems to be infected. 

Link to comment
Share on other sites

Run commands don't like spaces in paths unless you add quotes around it. ..same is true through the command line

Example

$s = '"./some dir/some.exe"'

Or, on the run itself:

Run ('"' & $yourvariable & '"')

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
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
 Share

×
×
  • Create New...