wceload & wm6

J

James levertopf

hello

I want to install a cab silently. Heard that WM 6 has some new security
functions that is preventing it.

When I have a a.lnk-file with the following code:
166#\windows\wceload.exe /delete 0 /noui "\My Documents\mycab.cab"

It is working...

But when I use this:

CreateProcess("\\Windows\\wceload.exe", "/delete 0 /noui \"\\My
Documents\\mycab.cab\"", pi)
public bool CreateProcess(String ExeName, String CmdLine,
ProcessInfo pi)
{
Int32 INFINITE;
unchecked { INFINITE = (int)0xFFFFFFFF; }
bool result = false;
if (pi == null) pi = new ProcessInfo();
byte[] si = new byte[128];
result = CreateProcess(ExeName, CmdLine, IntPtr.Zero,
IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, si, pi) != 0;
WaitForSingleObject(pi.hProcess, INFINITE);
return result;
}

Its not working...

What's wrong?!
 
P

Paul G. Tobey [eMVP]

What did you do to make it work?

Paul T.

James levertopf said:
Working now

James levertopf said:
hello

I want to install a cab silently. Heard that WM 6 has some new security
functions that is preventing it.

When I have a a.lnk-file with the following code:
166#\windows\wceload.exe /delete 0 /noui "\My Documents\mycab.cab"

It is working...

But when I use this:

CreateProcess("\\Windows\\wceload.exe", "/delete 0 /noui \"\\My
Documents\\mycab.cab\"", pi)
public bool CreateProcess(String ExeName, String CmdLine,
ProcessInfo pi)
{
Int32 INFINITE;
unchecked { INFINITE = (int)0xFFFFFFFF; }
bool result = false;
if (pi == null) pi = new ProcessInfo();
byte[] si = new byte[128];
result = CreateProcess(ExeName, CmdLine, IntPtr.Zero,
IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, si, pi) != 0;
WaitForSingleObject(pi.hProcess, INFINITE);
return result;
}

Its not working...

What's wrong?!

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top