Tuesday, January 22, 2013

Compiling ARM desktop applications for Windows 8 RT?

Microsoft has disabled compiling ARM desktop application on Visual Studio 2012 even if it is possible technically and the binaries can run without an issue (provided that they are signed by Microsoft).

In order to re-enable the support for ARM desktop application building in Visual Studio 2012, you have to follow these two steps :
  • Edit the file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\ARM\Microsoft.Cpp.ARM.Common.props" and add the following line to the section PropertyGroup : "< WindowsSDKDesktopARMSupport > true < / WindowsSDKDesktopARMSupport > "
  • Add the following define to your project, Makefile or command line through the /D switch: _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE.

Wednesday, January 16, 2013

Backup and restore Windows 7 activation status (Offline activation after reinstall)

This post is just a reminder of the necessary steps in order to backup Windows 7 activation status before doing a clean re-install and then restoring it back.
They are taken from post on the following link : http://www.mydigitallife.info/how-to-backup-and-restore-windows-7-and-server-2008-r2-activation-status-activate-offline-on-reinstall/
  1. Copy and save or backup the following activation-related files to external storage medium such as USB flash drive or portable hard disk drive: C:\Windows\ServiceProfiles\NetWorkService\
    AppData\Roaming\Microsoft\SoftwareProtectionPlatform\Tokens.dat
    and,C:\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms
    Note: For 64-bit (x64) OS, C:\Windows\SysWOW64\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms have to be backed up too.
  2. Retrieve and record the product key used to install and activate the current Windows 7 or Windows Server 2008 R2.
  3. Reinstall Windows 7 or Windows Server 2008 R2. When installation wizard prompts for a product key for activation, leave it blank (do not enter anything).
  4. In the newly installed Windows operating system, stop the Software Protection Service in Services.msc or with the following command (run in elevated command prompt): net stop sppsvc
  5. Navigate to the following folder: C:\Windows\System32\spp\tokens\pkeyconfig\
    Note: In 64-bit (x64) operating system, also perform the action in C:\Windows\SysWOW64\spp\tokens\pkeyconfig\ folder.
  6. Take ownership and give user full control permissions (alternatively add grant full control right click menu item) to pkeyconfig.xrm-ms file.
  7. Delete the original default pkeyconfig.xrm-ms file, and replace with the backup copy.
  8. Navigate to the following folder: C:\Windows\ServiceProfiles\NetWorkService\
    AppData\Roaming\Microsoft\SoftwareProtectionPlatform\

  9. Take ownership and give user full control permissions (alternatively add grant full control right click menu item) to tokens.dat file.
  10. Delete the original default tokens.dat file, and replace with the backup copy.
  11. Restart the Software Protection Service in Services.msc or with the following command (run in elevated command prompt): net start sppsvc
  12. Register the product key for Windows 7 or Windows Server 2008 R2 with the following command (run in elevated command prompt): slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
    Replace xxxxx-xxxxx-xxxxx-xxxxx-xxxxx with the actual product key.
  13. Windows will activated instantly, off-line. To check activation status, uses of of the following commands: 
    • slmgr.vbs -dlv
    • slmgr.vbs -dli
    • slmgr.vbs -ato

Friday, July 29, 2011

Advapi32 patch for 64-bit Windows XP SP2

I have been asked this week by a customer to provide the patch for the advapi32 dll on Windows XP SP2 64-bit, with version number 5.2.3790.4455. For the 32-bit dll that resides in SysWOW64, it is the same as the one I have already published for Windows Server 2003 SP2. So, I had only to come up with the patch for the 64-bit dll. And without waiting, here are the patch bytes :
  • Advapi32 dll version 5.2.3790.4455 in SysWOW64 directory :
    • At offset 0x11E3F : change 75 to 90
    • At offset 0x11E40 : change 08 to 90
    • At offset 0x11E47 : change 74 to EB
  • Advapi32 dll version 5.2.3790.4455 in System32 directory :
    • At offset 0x11B05 : change 0F to 90
    • At offset 0x11B06 : change 84 to E9
    • At offset 0x4D06F : change 0F to 90
    • At offset 0x4D070 : change 85 to 90
    • At offset 0x4D071 : change 96 to 90
    • At offset 0x4D072 : change 4A to 90
    • At offset 0x4D073 : change FC to 90
    • At offset 0x4D074 : change FF to 90

Thursday, May 5, 2011

Alternative method to disable Certificate Propagation service

Apart from disabling the Certificate Propagation service under Vista/7 using the Services MMC, you can do the same by modifying the registry: under HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CertProp, set the REG_DWORD value CertPropEnabled to 0.This will forbid the service from starting until you set it again to 1.

Sunday, February 20, 2011

Advapi32 patch for 64-bit Vista SP2 and Windows 2008 SP2

Recently, a reader of this blog asked for the patch of the 64-bit advapi32 dll of Windows Server 2008 SP2 64-bit (version 6.0.6002.18005). So, here it is (it also applies to Vista SP2 64-bit).
For the 32-bit advapi32 dll on these systems, I have already published the corresponding patch in the following post about Vista SP2 : http://blog.idrassi.com/2009/08/advapi32-patch-for-windows-vista-sp2.html

  • Advapi32 dll in System32 directory, version 6.0.6002.18005:
    • At offset 0x2BC9D : change 75 to 90
    • At offset 0x2BC9E : change 0B to 90
    • At offset 0x2BCA4 : change 0F to 90
    • At offset 0x2BCA5 : change 84 to E9
Its new SHA-256 hash value that should be put in the manifest files is :
oUGG12aBTnJoj/xm5nagheO7ePTc0P3BfW1fxRdbwB4=