Link to home
Create AccountLog in
Avatar of MCLR
MCLRFlag for Ireland

asked on

run a cab file programatically in compact framework

I have an application called autorun.exe that i am placing on an sd card , from within this application i am trying to run a cab file to install an application on windows mobile 5. i just get an error message saying the application was not installed correctly so it looks like its trying to run the cab file to some extent

any suggestions ?
string filepath = "Cabfiles\\test.cab";
System.Diagnostics.ProcessStartInfo startinfo;
 
startinfo = new System.Diagnostics.ProcessStartInfo(filepath, "");
startinfo.UseShellExecute = true;
 
System.Diagnostics.Process.Start(startinfo);

Open in new window

Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

you should launch WceLoad.exe with the CAB name as a parameter
Avatar of MCLR

ASKER

I tried the following but with the same result

System.Diagnostics.Process.Start("wceload.exe","CabFiles\\test.cab");
hmm, and what happens if you install it manually? besides, I would try "\\Cabfiles" instead of just "Cabfiles" (or whatever full path it is)
Avatar of MCLR

ASKER

Yes i had tried both , if i run the cab file manually it installs correctly with no issue
ah, I remember that sometimes there is a problem with WceLoad and CAB files being not in the root folder. try launch the CAB from root folder of the PDA, eiither with UseShellExecute = true for CAB or without it for WceLoad

I have somewhere working code in C++ which is easily convertible to C#
Avatar of MCLR

ASKER

ya if you could post some code that would be great
ASKER CERTIFIED SOLUTION
Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of MCLR

ASKER

Thank that did the job ,much appriciated