Jump to content

Trouble to run an app with parameters


Recommended Posts

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...