Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Mon, 10 Mar 2008 16:35:00 -0700,    group: microsoft.public.win32.programmer.wmi        back       


Maximum command line length   
I'm using the WMI Scripting API to create a process. It works fine most of 
the time. However, every once in a while Win32_Process.Create fails and 
returns 9. The docs say 9 means "Path not found": 
http://msdn2.microsoft.com/en-us/library/aa389388(VS.85).aspx

The command line I'm executing is of the form:

"c:\<path>\<file>.exe" foobar --did 2 --pid 4 --oid 
ecccc684-29df-4140-87ac-506df05aa606

The executable path is the same in cases where it works, and in cases where 
it doesn't. What is different are the arguments, the ids change and sometimes 
there are more arguments. 

The WMI docs also say that "The system adds a null character to the command 
line, trimming the string if necessary, to indicate which file was actually 
used."

So does this mean that WMI imposes a maximum command line length? Is this 
the same or different than 32K character limit imposed by the Win32 
CreateProcess API: http://msdn2.microsoft.com/en-us/library/ms682425.aspx

Does anyone have any ideas how to troubleshoot this?

Thanks in advance,
Josh
date: Mon, 10 Mar 2008 16:35:00 -0700   author:   --josh--

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us