Sign in to follow this  
Followers 0
gempie

Trouble to run an app with parameters

4 posts in this topic

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)

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

Thanx for the quick reply Squirrely1 but it doesn't work, any other id?

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
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
Sign in to follow this  
Followers 0