Clay Posted January 19, 2010 Share Posted January 19, 2010 I have searched for this issue in other forum and got quite a few references to this type of error, but none of them seemed to fit my particular circumstances...so I need help! Here we go. So i built this giant elaborate app using Autoit for work (too big and detailed for me to explain what it does), and the app works Great! However, the app only runs great only for me because - so far - I can't get it to work on anyone else's machine . The app uses a python script that I wrote to launch a packaging process and then provide me with some feeback..... and on a machine other than mine when I try to launch the app that uses the following command to run the python script I get the following error. $OUTPUT = Run($XMLRPC_PreCfg & " " & $USERNAME & " " & $PROD & " " & $VERSION & " " & $request_id & " " & $ROOT, _ _PathFull(@ScriptDir & "..\XML_RPC\"), @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Where $XMLRPC_PreCfg is Local $XMLRPC_PreCfg = _PathFull(@ScriptDir & "..\XML_RPC\XMLRPC_Client\XMLRPC_Client.exe") and the rest is self explanatory. I also tried $OUTPUT = Run($XMLRPC_PreCfg & " " & $USERNAME & " " & $PROD & " " & $VERSION & " " & $request_id & " " & $ROOT, _ _PathFull(@ScriptDir & "..\XML_RPC\XMLRPC_Client\"), @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) but that didn't work . The python script is compiled so python is not required on the machine, but I installed python on the machine nonetheless to see if this was the issue and I got the same error. I should note: On one of my test machines I was experiencing this BECAUSE my test machine has the latest version of Autoit... I removed that latest and installed v3.2.10.0 - which is what I have on my main machine - along with python and that worked fine. Therefore i thought there may be some issues with the latest version that is causing this....but then when I tried doing the same thing on a co-workers machine I got the same error. I am at the end of my witts at this time.....I wrote thousands of lines of code for this. Please help. P.S: I can't use the other options to run my python script because I have to be able to get back the results of stdout for the rest of my app to work.... any suggestions? Link to comment Share on other sites More sharing options...
Danny35d Posted January 19, 2010 Share Posted January 19, 2010 From which folder are you running your script. If the folder name has spaces you will get the error message. I will try to use FileGetShortName() function: $OUTPUT = Run(FileGetShortName($XMLRPC_PreCfg) & " " & $USERNAME & " " & $PROD & " " & $VERSION & " " & $request_id & " " & $ROOT, _ _PathFull(@ScriptDir & "..\XML_RPC\XMLRPC_Client\"), @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Clay Posted January 20, 2010 Author Share Posted January 20, 2010 Danny35d, Thanks for your response and effort to help me. I have resolved the issue -well at least gotten my script to work. For the benefit of anyone who may encounter this after me, in an effort to prevent you from acquiring a few more grays... this is how I resolved this. I executed my command using a literal string using @ComSpec...see below! Local $pString = '"' & $XMLRPC_PreCfg & '"' & " " & USERNAME & " " & $PROD & " " & $VERSION & " " & $request_id & " " & ROOT $OUTPUT = Run(@ComSpec & ' /c "' & $pString & '"', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Note: I still think the Run() is a little buggy but this is a good workaround. 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