gempie Posted June 27, 2006 Share Posted June 27, 2006 Hi there, First of all i want to thank everybody for theire help. My problem is the following: I want to run an app (ezdicom.exe) with some parameters which open files. in an cmd window i type "c:\new\ezdicom.exe 0.dcm 1.dcm" this opens the ezdicom program and opens it with the files 0.dcm and 1.dcm opened. Everything works fine. If i type it in start execute all works fine. However i want to use it in an script but nothing seems to work. What am i missing? This is what i tried: RunWait("c:\new\ezdicom 0.DCM") $help = @ScriptDir & "c:\new\" Run("c:\new\ezdicom.exe " & '"' & $help & '"') Run(@COMSPEC & ' /c "c:\new\ezdicom.exe 0.dcm 1.dcm"','',@sw_hide) run("c:\new\eZdicom.exe 0.dcm 1.dcm") #include <Process.au3> $rc = _RunDos("c:\new\eZdicom.exe 0.dcm 1.dcm") RunWait(@ComSpec & " /c " & "c:\new\eZdicom.exe 0.dcm 1.dcm") RunWait(@ComSpec & 'c:\new\eZdicom.exe 0.dcm 1.dcm','',@SW_HIDE) Link to comment Share on other sites More sharing options...
Squirrely1 Posted June 27, 2006 Share Posted June 27, 2006 Hi there, First of all i want to thank everybody for theire help. My problem is the following: I want to run an app (ezdicom.exe) with some parameters which open files. in an cmd window i type "c:\new\ezdicom.exe 0.dcm 1.dcm" this opens the ezdicom program and opens it with the files 0.dcm and 1.dcm opened. Everything works fine. If i type it in start execute all works fine. However i want to use it in an script but nothing seems to work. What am i missing? This is what i tried: RunWait("c:\new\ezdicom 0.DCM") $help = @ScriptDir & "c:\new\" Run("c:\new\ezdicom.exe " & '"' & $help & '"') Run(@COMSPEC & ' /c "c:\new\ezdicom.exe 0.dcm 1.dcm"','',@sw_hide) run("c:\new\eZdicom.exe 0.dcm 1.dcm") #include <Process.au3> $rc = _RunDos("c:\new\eZdicom.exe 0.dcm 1.dcm") RunWait(@ComSpec & " /c " & "c:\new\eZdicom.exe 0.dcm 1.dcm") RunWait(@ComSpec & 'c:\new\eZdicom.exe 0.dcm 1.dcm','',@SW_HIDE) In this command, which you need if passing params and not using a Dll call, you enclosed the path of the executable in quotes even though there are no spaces in the filepath. Run(@COMSPEC & ' /c "c:\new\ezdicom.exe 0.dcm 1.dcm"','',@sw_hide) Try this for such filepaths: Run(@COMSPEC & ' /c c:\new\ezdicom.exe 0.dcm 1.dcm','',@sw_hide) Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
gempie Posted June 27, 2006 Author Share Posted June 27, 2006 Thanx for the quick reply Squirrely1 but it doesn't work, any other id? Link to comment Share on other sites More sharing options...
gempie Posted June 27, 2006 Author Share Posted June 27, 2006 Thanx all, I found the solution, i had to set the working dir like this: Run(@COMSPEC & ' /c ezdicom.exe 0.dcm 1.dcm','c:\new',@sw_hide) 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