Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Visual C++ 2005 in Windows PE 2 [modified] [SOLVED]

Visual C++ 2005 in Windows PE 2 [modified] [SOLVED]

Scheduled Pinned Locked Moved C / C++ / MFC
c++csharpphphtmldatabase
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dybs
    wrote on last edited by
    #1

    Has anyone succeeded in getting the Visual C++ 2005 runtime or .NET 2.0 to work in Windows PE 2.0? Everything I've found online (such as here[^]) indicates no one has gotten this to work except some guy who goes by Zoronax, but he never described how he got it to work. I did find a plugin[^] that is supposed to work for PE 1.6, but not PE 2.0, so that does me no good I'm trying to automate our workstation backups in Windows PE, and I need to determine which user belongs to a given machine. We figured the best way is to compare the MAC address against a text file that maps MAC address to user name. I tried doing this in a batch file using

    FOR /F "tokens=2 delims=:" %%I IN ('ipconfig /all ^| find /I "Physical Address"') DO 'process file here'

    but the %%I variable has a trailing CR at the end and I can't seem to get rid of it. Since that wasn't working, I wrote a small C++ utility to do the comparison and display the user name. It works find in XP and Vista, but I get a "side-by-side configuration is incorrect" error in Windows PE. I assume this means I need to install the Visual C++ 2005 runtime. When I try to run the installer for it, though, msiexec throws a "File could not be found" error. Any ideas? Thanks, Dybs

    The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen

    modified on Monday, January 18, 2010 7:23 PM

    D 1 Reply Last reply
    0
    • D dybs

      Has anyone succeeded in getting the Visual C++ 2005 runtime or .NET 2.0 to work in Windows PE 2.0? Everything I've found online (such as here[^]) indicates no one has gotten this to work except some guy who goes by Zoronax, but he never described how he got it to work. I did find a plugin[^] that is supposed to work for PE 1.6, but not PE 2.0, so that does me no good I'm trying to automate our workstation backups in Windows PE, and I need to determine which user belongs to a given machine. We figured the best way is to compare the MAC address against a text file that maps MAC address to user name. I tried doing this in a batch file using

      FOR /F "tokens=2 delims=:" %%I IN ('ipconfig /all ^| find /I "Physical Address"') DO 'process file here'

      but the %%I variable has a trailing CR at the end and I can't seem to get rid of it. Since that wasn't working, I wrote a small C++ utility to do the comparison and display the user name. It works find in XP and Vista, but I get a "side-by-side configuration is incorrect" error in Windows PE. I assume this means I need to install the Visual C++ 2005 runtime. When I try to run the installer for it, though, msiexec throws a "File could not be found" error. Any ideas? Thanks, Dybs

      The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen

      modified on Monday, January 18, 2010 7:23 PM

      D Offline
      D Offline
      dybs
      wrote on last edited by
      #2

      After some more searching, I ran across this thread[^] that suggests using static linking. I'll give that a try tomorrow and see if I have any luck. Dybs

      The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen

      S 1 Reply Last reply
      0
      • D dybs

        After some more searching, I ran across this thread[^] that suggests using static linking. I'll give that a try tomorrow and see if I have any luck. Dybs

        The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen

        S Offline
        S Offline
        Spawn Melmac
        wrote on last edited by
        #3

        I have done quite a bit of work with WinPE and yes statically linking the runtime is the best solution for your own code. However standing back a second, you do know that you can add packages to the WinPE image and one of these is: WinPE-Scripting Windows Script Host (WSH) support. Enables batch file processing using WSH script objects. So rather than going to the trouble of creating an executable you can use VBS or JS with Cscript.exe to do the work. This might give you mor felixibility in the long term. Also watch out for dependancy issues. I have a WinPE image I use for data recovery, forensics and general stuff in which I use a number of freeware tools. A lot of these have late binding dependancies which, once you know what they are, are simple to resolve by copying the dependant DLL's in to the WIM. Alan

        D 1 Reply Last reply
        0
        • S Spawn Melmac

          I have done quite a bit of work with WinPE and yes statically linking the runtime is the best solution for your own code. However standing back a second, you do know that you can add packages to the WinPE image and one of these is: WinPE-Scripting Windows Script Host (WSH) support. Enables batch file processing using WSH script objects. So rather than going to the trouble of creating an executable you can use VBS or JS with Cscript.exe to do the work. This might give you mor felixibility in the long term. Also watch out for dependancy issues. I have a WinPE image I use for data recovery, forensics and general stuff in which I use a number of freeware tools. A lot of these have late binding dependancies which, once you know what they are, are simple to resolve by copying the dependant DLL's in to the WIM. Alan

          D Offline
          D Offline
          dybs
          wrote on last edited by
          #4

          Alan, Thanks for the suggestions. I ended up going with VBScript and it works perfectly. I based my solution off of an Experts Exchange post from this Google search (9th entry from the top)[^]. Dybs

          The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups