Wednesday, November 20, 2013

Restore Windows 8 or Windows 8.1 builtin Metro apps after recreating user profile

When a user (either domain or local) logs in to a Windows 8/8.1 PC his profile is created, and bundled Metro apps (most importantly Store and PC settings) are installed to his profile.

If the profile gets corrupter or for whatever other reason recreated, the apps can no longer be started, and various troubleshooters and/or permissions fixes do not help. Errors similar to this can be found in the event log:

Activation of app windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel failed with error: This app does not support the contract specified or is not installed. See the Microsoft-Windows-TWinUI/Operational log for additional information.

The three applications that are deeply integrated and cannot be removed from Windows (and hence, cannot be reinstalled trough Store) can be recovered by typing the following into elevated administrative command prompt:

powershell -ExecutionPolicy Unrestricted Add-AppxPackage -DisableDevelopmentMode -Register $Env:SystemRoot\WinStore\AppxManifest.xml
powershell -ExecutionPolicy Unrestricted Add-AppxPackage -DisableDevelopmentMode -Register $Env:SystemRoot\ImmersiveControlPanel\AppxManifest.xml
powershell -ExecutionPolicy Unrestricted Add-AppxPackage -DisableDevelopmentMode -Register $Env:SystemRoot\FileManager\AppxManifest.xml
powershell -ExecutionPolicy Unrestricted Add-AppxPackage -DisableDevelopmentMode -Register $Env:SystemRoot\Camera\AppxManifest.xml

IBM Proprinter II for Windows Vista, Windows 2008, Windows 7, Windows 200 Windows 2008 R2

I have finally found a way to make IBM Proprinter II drivers work with Windows Vista, Windows 2008, Windows 7, Windows 200 Windows 2008 R2. Here it goes:

1. Create folder foldername with subfolders foldername\32 and foldername\64
2. 32 bit: copy ibprores.dll and ibpro2.gpd from XP/2003CD32bit\I386\DRIVER.CAB to foldername\32
3. 64 bit: copy  ibprores.dll and ibpro2.gpd from XP/2003CD64bit\AMD64\DRIVER.CAB to  foldername\64
4. Create foldername\ibpro2.inf and fill it with the following text:

[Version]
Signature="$Windows NT$"
Provider="Krle"
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer
CatalogFile=ibpro2w6.cat
DriverVer=03/01/2012,00.00.00.02

[Manufacturer]
"IBM"=IBM, NTamd64

[IBM]
"IBM Proprinter II"                                    = IBPRO2.GPD          ,IBMIBM_Proprinter_II6726,IBM_Proprinter_II

[IBM.NTamd64]
"IBM Proprinter II"                                    = IBPRO2.GPD          ,IBMIBM_Proprinter_II6726,IBM_Proprinter_II

[IBPRO2.GPD]
CopyFiles=@IBPRORES.DLL,@IBPRO2.GPD
DataSection=UNIDRV_DATA
Include=ntprint.inf
Needs=UNIDRV.OEM

[DestinationDirs]
DefaultDestDir=66000

[SourceDisksNames.x86]
1   = %Disk1%,,,"32"

[SourceDisksNames.amd64]
1   = %Disk1%,,,"64"


[SourceDisksFiles]
IBPRORES.DLL = 1
IBPRO2.GPD = 1

[Strings]
Disk1="Proprinter II Driver Setup Disk"

5. That's it, proceed to install your printer normally with pointing "Have Disk" to your folder name. You will have to accept the warning about unsigned driver of course, but the files are copied from Windows installation media, and the only "downloaded" file is the inf which you can inspect.