none
Side-by-side configuration is incorrect - From WinPE 2.0 RRS feed

  • Question

  • Not sure if this is the right forum to post this, but if anyone can steer me in the right direction, that'd be great.  

     

    So here is the problem I am currently having.  I am trying to find another way to wipe our hard drives that is a much faster, easier way.  Right now, all drives are encrypted with Sophos Safeguard 5.50.  Sophos offers a utility, BEInvVol.exe (http://www.sophos.com/support/knowledgebase/article/108268.html) that deletes the encryption keys off of the drive.  Since these keys are not backed up, if they are deleted, the information on the drive can never be recovered.  Essentially, it is as good as wiping the drive.  Only it'll work much faster than using a wipe utility.  

     

    Now, when I boot into our WinPE 2.0 disk, and I try to run BEInvVol.exe, I get this error "The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail."  I've done a lot of searching around, and have decyphered this cryptic message: I am missing certain libraries that this program needs to run.  Specifically, when looking at the exe's hex code, and when running the program using sxstrace, I see I need the library for "Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)" which can be found at http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5638  Now, here it the problem: I am running WinPE.  I can't run this installer in that environment.  When I try and run vcredist_x86.exe (the installer for C++ 2005 SP1) after WinPE 2.0 has booted up, I get this error "Error creating process &gt;<msiexec /i  vcredist.msi>&lt; Reason: The system cannot find the file specified"  

     

    Now, here is the output when I have sxstrace running in another cmd window in WinPE 2.0:

     

     

    =================
    
    Begin Activation Context Generation.
    
    Input Parameter:
    
    	Flags = 0
    
    	ProcessorArchitecture = x86
    
    	CultureFallBacks = en-US;en
    
    	ManifestPath = X:\beinvvol.exe
    
    	AssemblyDirectory = X:\
    
    	Application Config File = 
    
    -----------------
    
    INFO: Parsing Manifest File X:\beinvvol.exe.
    
    	INFO: Manifest Definition Identity is (null).
    
    	INFO: Reference: Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762"
    
    INFO: Resolving reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762".
    
    	INFO: Resolving reference for ProcessorArchitecture x86.
    
    		INFO: Resolving reference for culture Neutral.
    
    			INFO: Applying Binding Policy.
    
    				INFO: No publisher policy found.
    
    				INFO: No binding policy redirect found.
    
    			INFO: Begin assembly probing.
    
    				INFO: Did not find the assembly in WinSxS.
    
    				INFO: Attempt to probe manifest at X:\windows\assembly\GAC_32\Microsoft.VC80.CRT\8.0.50727.762__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
    
    				INFO: Attempt to probe manifest at X:\Microsoft.VC80.CRT.DLL.
    
    				INFO: Attempt to probe manifest at X:\Microsoft.VC80.CRT.MANIFEST.
    
    				INFO: Attempt to probe manifest at X:\Microsoft.VC80.CRT\Microsoft.VC80.CRT.DLL.
    
    				INFO: Attempt to probe manifest at X:\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
    
    				INFO: Did not find manifest for culture Neutral.
    
    			INFO: End assembly probing.
    
    	ERROR: Cannot resolve reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762".
    
    ERROR: Activation Context generation failed.
    
    End Activation Context Generation.
    
    
    
    
    
    ===================
    
    

     

    Now, I should also mention, that I can run this utility when I have booted into good ol' Windows Xp SP3.  However, the utility has to run in WinPE.  Here is the error message I get when I run it in Windows XP SP3:

     

    &Info: SGN filter driver on

    Error: SGN filter driver may not be on!

    Use other system to start like Windows PE from a CD!

     

    So the program does need to be run from WinPE.  Now, The folder on my machine where these DLLs live is "C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700"  I copied this directory over to the same directory on the machine after it has booted to WinPE.  I copy it over to the X: drive, which is the RAM, which is where the OS is booting from.  Still no good.  Tried copying it to "X:\windows\assembly\GAC_32\Microsoft.VC80.CRT\8.0.50727.762__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL" as well, but that didn't fix the issue.  

     

    Now, there are two solutions that I can figure out.  

     

    1) The C++ 2005 installer, vcredist_x86.exe, might not just create C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 with the 3 DLLs in it; it might do more.  So, if it does do more, maybe I need to copy those extra files over to the X drive and that would solve the problem.  

    2) Or, these DLLs need to be there when WinPE first boots up, which means I need to build a new WinPE disk and have it include these libraries.  

     

    I've never built a WinPE boot disk before, but I've been taking some steps to learn how.  I have Microsoft Windows AIK installed, and I can make a boot disk (by following some instructions).  However, I need it customized to have these added libraries.  I kinda know/can figure out how to do this, but I see a slight problem with it: If I just include the DLLs, maybe I'm still missing some things that the installer adds.  So, is there a way I can create a custom WinPE 2.0 boot disk that uses the C++ 2005 package installer (vcredist_x86.exe), so when the disk is made, it includes everything that vcredist_x86.exe would normally add?

     

     

    Sorry for the long post, but its always good to have more information than less.  Also, I tried this on a WinPE boot disk that is running 3.0.  Still the same problem.  

     

     

    So to recap, I need Microsoft Visual C++ 2005 SP1 libraries to run a program off of a WinPE 2.0 disk.  I've added the libraries from the C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 onto the same folder on the X: drive directly, and that didn't solve the issue.  Maybe I'm missing some other files that I need to copy over?  I'm not sure.  Or, I need to build a new WinPE boot disk that includes all of the libraries that the vcredist_x86.exe package installs.  

     

    Thanks for any and all help!

    Friday, July 8, 2011 4:30 PM

Answers

  • There is nothing you can personally do, this is completely down to the people who built the application to fix. The reason why it is not recommended to use the DLL versions of 2005 and 2008 is because of the SxS. There is limited support for it in a PE environment because WinSxS doesn't exist so no global assemblies can get installed and all is left is private assemblies (and these can be problematic).

    Also, the terms global assembly and private assembly should be fairly easy to understand, but assembly is a collection of related files (like the CRT is an assembly here, and the related files are msvcr80.dll, msvcm80.dll and msvcp80.dll) and all of these makes up the Microsoft.VC80.CRT assembly. Global and private just means where it is installed, global means it is in WinSxS and all applications can use it where private means it is just in the application's directory and is only intended for use by that application only. So private assembly here can just be read as private copy.

    Well anyway, for what files you need, the normal way of doing this is going to the VC install directory and getting the required files from there. If you have VS2005 and SP1 only (no updates like the ATL update or MFC update) then you can get the required files from <VS Install dir>\VC\Redist\x86\Microsoft.VC80.CRT. There should be 4 files in here, the msvcx80.dll files and Microsoft.VC80.CRT.manifest file. You need to copy all of these to the same directory as your executable. But be aware of my warning, this will only work if your VS2005 install only has SP1 installed, this will faill otherwise (VS2005 with no SP, or VS2005SP1 with any updates will have a different version number and will fail when loading).

    If you don't have this, the easiest way around it is to copy these files from a live WinSxS install (although I personally never did this so I can't say how successful it is). If you go to c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8 and copy the three files in there to the same directory as your application and then go to C:\Windows\winsxs\Manifests and copy x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8.manifest to your application's directory then rename it to Microsoft.VC80.CRT.manifest then this should work.

    So just to confirm, with this you will have at least 5 files, beinvvol.exe, any dependencies for this application if necessary, Microsoft.VC80.CRT.manifest, msvcr80.dll, msvcm80.dll and msvcp80.dll.


    This is a signature

    Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
    Visit my (not very good) blog at
    http://ccprogramming.wordpress.com/
    • Proposed as answer by Pavel A Monday, July 11, 2011 4:17 PM
    • Marked as answer by Matt_757 Tuesday, July 12, 2011 12:52 PM
    Monday, July 11, 2011 3:11 PM

All replies

  • The only solution that has worked for me on my own software is to statically link to the CRT and any other libraries and remove the manifest when I compile the application.  But since you don't have the application's code, you cannot do this.  I can therefore provide no other solution except:  Contact the software manufacturer and request a version that can be run under WinPE 2.0.
    MCP
    • Proposed as answer by Pavel A Monday, July 11, 2011 4:09 PM
    Friday, July 8, 2011 5:42 PM
  • Thanks, I'm also trying this, but so far have been unsuccessful with their support group.  It is a little crazy; they provide a utility that can only run in WinPE, but the libraries aren't guaranteed to be included in the WinPE OS (in fact they most likely will not be there).  You'd think they would statically include the libraries.  I guess that makes too much sense.  Thanks for the tip, though.
    • Proposed as answer by webJose Friday, July 8, 2011 7:05 PM
    • Unproposed as answer by webJose Friday, July 8, 2011 7:05 PM
    Friday, July 8, 2011 6:57 PM
  • The thing is, I can't remember where but Microsoft themselves tell you not to use the DLL version of the CRT for VS2005 or VS2008 in Windows PE. Obviously some people haven't been reading up on everything they should.

    Well, if you get the VS2005 SP1 version of the VC redist you can try to copy the CRT files and manifest into the same directory as the executable so it it is a private assembly. I've had some success with this working in Windows PE, but private assemblies are a pain.


    This is a signature

    Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
    Visit my (not very good) blog at
    http://ccprogramming.wordpress.com/
    Friday, July 8, 2011 9:01 PM
  • Thanks for the reply, but can you elaborate a little more?  Here is what I was able to follow:

     

    What I need to run this executable is the 2005 "CRTs", or C/C++ RunTime Libraries, and using the DLLs is not recommend by Microsoft for use in WinPE.  Now, are you suggesting that I try it anyway, so I will copy the three DLLs into the same directory as my .exe?  Or are there other files that I'll need to copy over?  I'm also not sure what you mean by "private assembly."  

     

    Also, do you know why it is not recommended that you use DLL version of 2005 libraries?  Is there another format I can use?  Is this "other" format what I should be placing in the same directory as my .exe?  Thanks.

    Monday, July 11, 2011 2:35 PM
  • There is nothing you can personally do, this is completely down to the people who built the application to fix. The reason why it is not recommended to use the DLL versions of 2005 and 2008 is because of the SxS. There is limited support for it in a PE environment because WinSxS doesn't exist so no global assemblies can get installed and all is left is private assemblies (and these can be problematic).

    Also, the terms global assembly and private assembly should be fairly easy to understand, but assembly is a collection of related files (like the CRT is an assembly here, and the related files are msvcr80.dll, msvcm80.dll and msvcp80.dll) and all of these makes up the Microsoft.VC80.CRT assembly. Global and private just means where it is installed, global means it is in WinSxS and all applications can use it where private means it is just in the application's directory and is only intended for use by that application only. So private assembly here can just be read as private copy.

    Well anyway, for what files you need, the normal way of doing this is going to the VC install directory and getting the required files from there. If you have VS2005 and SP1 only (no updates like the ATL update or MFC update) then you can get the required files from <VS Install dir>\VC\Redist\x86\Microsoft.VC80.CRT. There should be 4 files in here, the msvcx80.dll files and Microsoft.VC80.CRT.manifest file. You need to copy all of these to the same directory as your executable. But be aware of my warning, this will only work if your VS2005 install only has SP1 installed, this will faill otherwise (VS2005 with no SP, or VS2005SP1 with any updates will have a different version number and will fail when loading).

    If you don't have this, the easiest way around it is to copy these files from a live WinSxS install (although I personally never did this so I can't say how successful it is). If you go to c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8 and copy the three files in there to the same directory as your application and then go to C:\Windows\winsxs\Manifests and copy x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8.manifest to your application's directory then rename it to Microsoft.VC80.CRT.manifest then this should work.

    So just to confirm, with this you will have at least 5 files, beinvvol.exe, any dependencies for this application if necessary, Microsoft.VC80.CRT.manifest, msvcr80.dll, msvcm80.dll and msvcp80.dll.


    This is a signature

    Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
    Visit my (not very good) blog at
    http://ccprogramming.wordpress.com/
    • Proposed as answer by Pavel A Monday, July 11, 2011 4:17 PM
    • Marked as answer by Matt_757 Tuesday, July 12, 2011 12:52 PM
    Monday, July 11, 2011 3:11 PM
  • Worked like a charm.  Thanks for the detailed explanation and all of your help, I really appreciate it!
    Tuesday, July 12, 2011 1:08 PM