Ghost Solution Suite

Expand all | Collapse all

Not able to run win32 applications on WinPE

Jump to Best Answer
  • 1.  Not able to run win32 applications on WinPE

    Broadcom Employee
    Posted 08-20-2014 02:41 AM

    I am trying to run some applications on WinPE.

    I have writter these applications, compiled on Visual Studio 2010.

    I see the ghost32.exe whihc is a similar application is running on WinPE, but why not my applicaaiotns.

     

    Thanks,

    basavesh

     

     

     

     



  • 2.  RE: Not able to run win32 applications on WinPE

    Posted 08-20-2014 03:49 AM

    WinPE is intended for deploying operating systems and does not include the GUI parts of windows. It is basically an updated version of DOS which uses parts of the Windows kernel for COMMAND LINE operations.

    Ghost is written to operate under DOS as a command line interface, that is why it works under WinPE.



  • 3.  RE: Not able to run win32 applications on WinPE

    Broadcom Employee
    Posted 08-26-2014 01:17 AM

    I was trying to run some win32 applications whihc have only command line outputs. They donot have any MFC or any other UI components in it.

    Am I missing something while creating these applications.

    Would there be any setting in Visual studio to make this work.

    Thanks,

    Basavesh



  • 4.  RE: Not able to run win32 applications on WinPE

    Posted 08-26-2014 10:20 AM

    Are you using any managed code that has a dependency on .NET ?

    Perhaps coding in VS2005 would avoid these issues.

    One further aspect that you might want to check is whether your WinPE environment has vbscript support loaded. This article :https://www-secure.symantec.com/connect/articles/readyadventures-winpe describes the end-to-end creation of WinPE boot media outside of the Ghost environment. I believe the default Ghost implementation of WinPE does not have all the support modules loaded to keep the boot size down.



  • 5.  RE: Not able to run win32 applications on WinPE

    Broadcom Employee
    Posted 08-26-2014 12:23 PM

    I suspect that your app uses .Net and  windows.forms namespace. You need to add the dependant packages when you build WinPE.

    See the list here:

    http://technet.microsoft.com/en-us/library/hh824926.aspx

    Pete



  • 6.  RE: Not able to run win32 applications on WinPE

    Trusted Advisor
    Posted 09-30-2014 05:00 PM

    I agree with the other posters in that your problem is you are trying to use a .NET application in WinPE.

    WinPE does not include by design any .NET components, nor can it be included in a way which Microsoft supports (Sorry Pete, there isn't a package to add for .NET support). Developers have been haranguing Microsoft for YEARS on this score, but Redmond just won't budge.

    People have gotten around this by,

    1. Coding in C++, VB6, Delphi, RealBasic etc etc
    2. Shoehorning in .NET into WinPE
    3. Using a special .NET binary compiler which creates your application as a standalone
    4. Try to do everything in an HTA

    I've only ever gotten around this by using option (1). If you google around you'll see mixed success with (2). There is a paid-for compiler which will create a standalone package with the required .NET assemblies but I can't for the life of me recall just now the guy that made it.

    Kind Regards,
    Ian./

    EDIT: After a good night's kip, I now remember the .NET assembly program that creates your .NET app as a standalone exe. It's the Salamander .NET linker



  • 7.  RE: Not able to run win32 applications on WinPE
    Best Answer

    Broadcom Employee
    Posted 10-01-2014 12:20 PM

    @ianakin I am sorry but you are not correct, WinPE has many modules that can be added imcluding .Net. I have been building WinPE for years with .Net support. See the extract below from:

    http://technet.microsoft.com/en-us/library/hh824926.aspx

    Microsoft .NET

    WinPE-NetFX

    WinPE-NetFX contains a subset of the .NET Framework 4.5 that is designed for client applications.

    Not all Windows binaries are present in Windows PE, and therefore not all Windows APIs are present or usable. Due to the limited API set, the following .NET Framework features have no or reduced functionality in Windows PE:

    • Windows Runtime
       
    • .NET Framework Fusion APIs
       
    • Windows Control Library event logging
       
    • .NET Framework COM Interoperability
       
    • .NET Framework Cryptography Model
       

    Dependencies: Install WinPE-WMI before you install WinPE-NetFX.

    WinPE-WMI.cab"                     
    WinPE-NetFx.cab"                   
    WinPE-Scripting.cab"               
    WinPE-PowerShell.cab"              
    WinPE-StorageWMI.cab"              
    WinPE-SecureStartup.cab"           
    en-us\WinPE-WMI_en-us.cab"         
    en-us\WinPE-NetFx_en-us.cab"       
    en-us\WinPE-Scripting_en-us.cab"   
    en-us\WinPE-PowerShell_en-us.cab"  
    en-us\WinPE-StorageWMI_en-us.cab"  
    en-us\WinPE-SecureStartup_en-us.cab"
                                       

    These are the packages I add currently to have .Net and PowerShell support.

    Pete



  • 8.  RE: Not able to run win32 applications on WinPE

    Trusted Advisor
    Posted 10-01-2014 01:15 PM

    Hi Pete,

    No need to apologise -I stand corrected!!! I completely missed in the 4.5 release that WinPE is a supported add-on in WinPE versions 4 and above.

    Kind Regards,

    Ian./

     

     



  • 9.  RE: Not able to run win32 applications on WinPE

    Posted 10-13-2014 04:35 PM

    Make sure you are using a x86 version of the PE package since the x64 version doesn't support the 32bit applications from running.  Just make sure you use an x86 pe with your x86 apps.    For an example pcAnywhere thin host is 32bit and won't run on the x64 pe packages but will on the x86 pe package. 

     

     



  • 10.  RE: Not able to run win32 applications on WinPE

    Trusted Advisor
    Posted 11-05-2014 01:33 PM

    Hi BasaveshBalikai, do you need any more advice on this one?



  • 11.  RE: Not able to run win32 applications on WinPE

    Trusted Advisor
    Posted 11-10-2014 04:59 AM

    For clarity, answer here dependeds on WinPE version and .NET target version you build your application with. WinPE4 and above are the only WinpE versions Microsoft supports with .NET 4.5 optional component.

    A useful article for those wanting to compare WinPE features is Microsofts, "What's New In WinPE",
    http://technet.microsoft.com/en-gb/library/dn293271.aspx

    Marking Peter's answer here as the best answer.