Hi,

We have a .net dll, which has a wrapper to command line tool. When we try to
call we enocunter this error. When we execute the same command from command
line it executes without error. Can anyone help us out with this problem?
Following is the error we encounter.

"d:\iw-home\Teamsite\bin\iwgetfilejobs
"\default\main\APAC\English\Demo\WORKAREA\workarea\templatedata\ExternalContent\1IntelWeb\data\13190252\180313.xml"
returns 1 : System.ComponentModel.Win32Exception: %1 is not a valid Win32
application at
System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start() at
Intel.Ebusiness.Platform.Content.Workflow.CommandLineTool.Execute() "

Re: %1 is not a valid Win32 application by jmaguero_vodafone

jmaguero_vodafone
Wed Apr 20 13:12:29 CDT 2005

Hello, Pradeep,

Maybe you aren't setting your ProcessStartInfo.Verb property to "open" =
before calling Process.Start.

Regards.


"Pradeep D" <PradeepD@discussions.microsoft.com> escribi=C3=B3 en el =
mensaje news:CA25B706-9691-466D-9B5A-8020370FBFAE@microsoft.com...
| Hi,
|=20
| We have a .net dll, which has a wrapper to command line tool. When we =
try to=20
| call we enocunter this error. When we execute the same command from =
command=20
| line it executes without error. Can anyone help us out with this =
problem?=20
| Following is the error we encounter.
|=20
| "d:\iw-home\Teamsite\bin\iwgetfilejobs=20
| =
"\default\main\APAC\English\Demo\WORKAREA\workarea\templatedata\ExternalC=
ontent\1IntelWeb\data\13190252\180313.xml"=20
| returns 1 : System.ComponentModel.Win32Exception: %1 is not a valid =
Win32=20
| application at=20
| System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo =
startInfo)=20
| at System.Diagnostics.Process.Start() at=20
| Intel.Ebusiness.Platform.Content.Workflow.CommandLineTool.Execute() "
|

Re: %1 is not a valid Win32 application by Jamus

Jamus
Wed Apr 20 15:09:23 CDT 2005

Reading this, I got the sinking feeling we're missing some quotations.
If iwgetfilejobs is the actual process and the .xml file is the
parameter you are trying to pass to it, you may need literal quotes
around the .xml. It looks like you've got an opening literal quote but
not a closing one. In fact, I could three quotes at all!

Perhaps it should be:

"D:\\iw-home\\Teamsite\\bin\\iwgetfilejobs
\"\\default\\main\\APAC\\English\\Demon\\WORKAREA\\workarea\\templatedata\\ExternalContent\\1IntelWeb\\data\\13190252\\180313.xml\""


Note the literal quotes (\") around the xml file's path, but also the
ending quote after the last literal quote.

Also, I don't think CreateProcess supports passing parameters as part
of the path to the executable.. have you considered using the
ShellExecute API (no idea where you'd find it in .NET though)?

Jarod