0

We have a win32 desktop application which would collect list of applications installed on the machine. Generally we would go to uninstall hive to collect application list (which is similar to how control panel populate its Add/Remove program list). With windows 8 store app, this is not working any more since store app is not stored same as desktop app. I am able to find this source code Enumerate app packages by user SID sample . I tested on windows 8, it works great. However there is a catch.

I would like to be able to link statically with windows CRT so I don't need to distribute CRT along with this simple exe (I could not assume that required CRT would be installed on customer's machine, plus our nightly build env is still VS2005, this could only build on developer machine, with that, the CRT version could be updated as part of VS update or windows update which would result in higher version of CRT than what's at customer's machine). Our current solution would ship CRT version which our code is built as private side by side assembly (on VS2005). However with WinRT on windows 8, I could not static link CRT library any more (the old CLI/C++ actually has the same limitation).

The sample code uses the PackageManager new at Windows 8 (WinRT). Just wonder if there is other way to get this information without WinRT. My gut feeling would be no, however it won't hurt to ask.

By the way, one thing I do notice is the embedded manifest for the exe built on VS 2012 doesn't have the dependentAssembly for CRT there at all like the exe I built on VS2005 as following:

<dependentAssembly>
  <assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50727.6195" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
4

1 回答 1

0

要访问 Windows 8 的新现代 UI 部分,您将需要 WinRT 库。

于 2012-12-03T21:09:56.920 回答