%1 is not a valid Win32 application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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() "
 
Hello, Pradeep,

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

Regards.


"Pradeep D" <[email protected]> escribió en el mensaje | 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() "
|
 
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
 
Back
Top