.NET Programming
 

     
Install directory of CAB files on a WindowsMobile Device using rapi CreateProcess and wceload.exe (with Wait functionality)

Keywords: rapi CreateProcess Blocking Call wceload.exe DeviceFileExists CAB files Windows Mobile Device

 

 
 

gabapentin pregnancy third trimester

gabapentin pregnancy

viagra diskuze

viagra cena dr max

domperidone eureka

domperidone sirop redirect

viagra na prodej

viagra cena lekaren hutoncallsme.azurewebsites.net

asthma rescue inhalers otc

over the counter asthma inhalers

melatonin and weed trip

melatonin and weed ecblog.azurewebsites.net

2015 cialis coupon

drug coupon

xanax and weed reddit

xanax and weed paranoia go

asthma rescue inhaler overuse side effects

asthma rescue inhaler overuse side effects read here

cialis koupit

cialis 20mg inetapakistan.azurewebsites.net

abortion papers

buy abortion pill

sertraline 50 mg and alcohol

sertraline and alcohol consumption brightonspanishlessons.co.uk

abortion pill price

buy abortion pill

saroten 30 mg

saroten erfaringer saroten alkohol saroten lundbeck

//using OpenNETCF.Desktop.Communication;

 

try

{

    while (!rapi.Connected) rapi.Connect();

 

 

    foreach (string file in Directory.GetFiles(CabPath, "*.cab"))

    {

        fileName = Path.GetFileName(file);

 

rapi.CopyFileToDevice(file, Path.Combine(devicePath, fileName), true);

        rapi.CreateProcess(@"\Windows\wceload.exe", "/noui \"" +

            Path.Combine(devicePath, fileName)+ "\"");

        // the Rapi CreateProcess call returns immedialy,

        //this may cause some of the Cab Files to fail to install

        // when multiple installations are required

 

        System.Threading.Thread.Sleep(1000);

        do

        {

            System.Threading.Thread.Sleep(100);

            Application.DoEvents();

        } while (rapi.DeviceFileExists(devicePath + "\\" + fileName) ==

true);

// Use the DeviceFileExists function to simulate a Blocking //thread and ensure that all CAB files are installed. 

        // By default the

  // wceload function removes the CAB file from the Device after  

  // successful or failed installation, so it's disappearance  

        // signals the end of the installation

 

        currentFile += 1;

        FileInstallParametersChange(totalFiles, currentFile);

    }

}

catch (Exception ex)

{

    Console.WriteLine(ex.Message);

    throw;

}

finally

{

    if (rapi.Connected) rapi.Disconnect();

}


 


 PTerryWave LLC      Return to Programming Listing
About