Sunday, May 16, 2010

ERROR: GetHHCodePackages reported: HHCM_DEVICE_NOT_SUPPORTED

Issue
Below error is received in BlackBerry Manager console when trying to deploy applications to handheld device.

GetHHCodePackages reported: HHCM_DEVICE_NOT_SUPPORTED Upgrade your copy of device.xml

Cause
BlackBerry Enterprise Server does not recognise the handset version.

Solution
Update Device.xml and Vendor.xml on all BES instances.

Complete the following steps:
  1. Download the updated device.xml and vendor.xml files from the following web sites:
    https://www.blackberry.com/Desktop/Download/XML/Device.xml

    https://www.blackberry.com/Desktop/Download/XML/Vendor.xml
  2. Copy these files to the following folder: C:\Program Files\Common Files\Research In Motion\AppLoader.
Note: There is no need to restart any services.

Source:
http://www.blackberryforums.com.au/forums/general-bes-discussion/2551-how-update-device-xml-file.html

Friday, May 14, 2010

Enumerate the Windows Uninstall key

Recently I created an application install script where I needed to scan for the existence of another MSI based install and remove it (if found) before installing a newer version. This script uses the StdRegProv object to create an array of subkeys in SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.

============================
Option Explicit

Const blnDebug = False
Const HKEY_LOCAL_MACHINE = &H80000002

Dim sSystemFolder, sUserProfile, sQuickLaunch, sComputer, oReg
Dim strKeyPath, subkey, arrSubKeys
Dim oWSH : Set oWSH = CreateObject("WScript.Shell")
Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")
Dim oNET : Set oNET = CreateObject("WScript.Network")
sUserProfile = oWSH.ExpandEnvironmentStrings("%USERPROFILE%")
sQuickLaunch = sUserProfile & "\Application Data\Microsoft\Internet Explorer\Quick Launch"
sSystemFolder = oFSO.GetSpecialFolder(1)
sComputer = oNET.ComputerName

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & sComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
If subkey = "{ProductGUID#1}" Or subkey = "{ProductGUID#2}" Then
'WScript.Echo subkey & " Application found, removing it now..."
oWSH.Run "MSIEXEC.EXE /X" & subkey & " /qn", 1, False
End If
Next

InstallMSIMST "\\servername\Packages\appname\appversion", "Setup.msi", "\\servername\Packages\appname\appversion", "Setup.mst", " /qn /norestart"

Function InstallMSIMST(szMSIPath, szMSIFile, szMSTPath, szMSTFile, szParams)
oWSH.Run (sSystemFolder & "\msiexec.exe /i " & Chr(34) & szMSIPath & "\" & szMSIFile & Chr(34) & " TRANSFORMS=" & Chr(34) & szMSTPath & "\" & szMSTFile & Chr(34) & szParams), 0, True
End Function

============================

Mitch

Sunday, May 9, 2010

ERROR: STOP 0x7B Error Message on Windows XP Sysprep Images

When you start Windows XP Setup after you copy an image to a new target computer, you may receive the following error message:

STOP 0x0000007B
INACCESSABLE_BOOT_DEVICE

--------------------------------------------------------------------------------
To preinstall a mass-storage device

  1. In the \$OEM$ subfolder of the configuration set, create the \Textmode subfolder.
  2. Copy the files from the disks supplied by the device vendor to the \Textmode subfolder. These files normally include:
    • Driver.sys
    • Driver.dll
    • Driver.inf
    • Driver.cat
    • Txtsetup.oem

    where Driver is the driver name.

    Notes

    • You must also copy the driver files to the location you specified in the OemPnPDriversPath entry in the answer file(s). For example:
      OemPnPDriversPath = drivers\storage 
    • Some drivers, such as SCSI miniport drivers, may not include a .dll file.
    • A catalog file (Driver.cat) must be included with mass-storage device drivers if it is listed in Txtsetup.oem.

      For more information about catalog files, see Using Signed Drivers. Also see the Microsoft Windows Driver Development Kit (DDK), which you can read in the MSDN Library (http://msdn.microsoft.com/library/): Select Windows Development, and then select Driver Development Kit.

  3. In the Unattend.txt file, create a [MassStorageDrivers] section, and then type any driver entries in that section. For example, a possible entry in the [MassStorageDrivers] section is:
    "Adaptec 2940..." = "OEM"

    Obtain the information for this section from the [SCSI] section of the Txtsetup.oem file provided by the hardware manufacturer.

    Note

    • You must use signed drivers. Unsigned drivers are not installed during an unattended installation.
  4. In the Unattend.txt file, create an [OEMBootFiles] section, and in it type a list of the files in the \$OEM$\Textmode folder. For example:
    [OEMBootFiles]
    Driver.sys
    Driver.dll
    Driver.inf
    Driver.cat
    Txtsetup.oem

    where Driver is the driver name.

    Important

    • Add driver entries only to the [MassStorageDrivers] and [OEMBootFiles] sections for bootable mass-storage devices. Do not include secondary mass-storage devices. Instead, add the drivers for secondary mass-storage devices to the folder specified by the OemPnPDriversPath entry in your unattended Setup answer file. Including drivers for non-bootable mass-storage devices in the [MassStorageDrivers] or [OEMBootFiles] sections causes an error during Setup.
  5. If your mass-storage device is a Plug and Play device, verify that a Hardware Identification section and the name of the catalog file for the driver (Driver.cat) exist in the Txtsetup.oem file. For more information, see the Microsoft Windows Driver Development Kit in the MSDN Library (http://msdn.microsoft.com/library/): Select Windows Development, and then select Driver Development Kit.

If the Hardware Identification section does not exist, you must add [HardwareIds.scsi.yyyyy] to the Txtsetup.oem file and verify that the following information is included:

id = "xxxxx" , "yyyyy"

where xxxxx represents the device ID, and yyyyy represents the service associated with the device.

For example, to preinstall the Symc810 driver, which has a device ID of PCI\VEN_1000&DEV_0001, verify that your Txtsetup.oem file contains the following additional section:

[HardwareIds.scsi.symc810]
id = "PCI\VEN_1000&DEV_0001","symc810"

You must remove drive and path references from Txtsetup.oem. For example, instead of this text, use the NTFS or FAT32 examples that follow:

[disks]
d1 = "Windows XP Driver Set v1.00", \w2kdsk1, \win2000\smy810\

For NTFS installations, use this text:

[disks]
d1 = "Windows XP Driver Set v1.00", \w2kdsk1, \

Note the trailing slash at the end of the line.

For FAT32 installations, use this text:

[disks]
d1 = "Windows XP Driver Set v1.00", w2kdsk1, .

Note the lack of a backslash; also note the trailing period at the end of the line.

Selecting and Loading the Correct Mass-Storage Driver

If you are including new or updated drivers for mass-storage devices, you must add the new driver to both of these folders:

  • \$OEM$\Textmode
  • The location specified in the OemPnPDriversPath entry in the Unattend.txt file.

    For example: \$OEM$\$1\Pnpdrvrs\storage

Loading Mass-Storage Drivers During Text-mode Setup

If the driver for the mass-storage device is included with Windows XP, the Windows XP driver is chosen before any drivers in \$OEM$\Textmode.

However, the driver you place in \$OEM$\Textmode is the first driver chosen during text-mode Setup only if:

  • The driver that ships with Windows XP does not boot.
  • The driver does not ship with Windows XP.

Other Material:
http://support.microsoft.com/kb/303786/
Seach for "Txtsetup.oem" in Microsoft Windows Corporate Deployment Tools User's Guide. deploy.chm from the Windows XP Deployment Tools

Friday, May 7, 2010

Howto: Add a local account to a local group using WMI

I had to write this script to add an account generated by Sophos AV to the local Users group in order for it to download software updates from the AV server post build.

Option Explicit

Dim oNET : Set oNET = CreateObject("WScript.Network")
Dim sComputer, objWMIService, colItems, objItem, objLocalUser, objUserGroup
sComputer = oNET.ComputerName

Set objWMIService = GetObject("winmgmts:\\" & sComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Account Where LocalAccount = True AND Name like '%partialusername%'",,48)
For Each objItem in colItems
Set objLocalUser = GetObject("WinNT://" & objItem.Name)
Set objUserGroup = GetObject("WinNT://" & sComputer & "/Users,group")
objUserGroup.Add(objLocalUser.ADsPath)
Next

WScript.Quit

Mitch

Thursday, April 15, 2010

HOWTO: Remove the Stored User Names and Password

To remove the Stored User Names and Passwords from Windows XP, try this:

  • Click Start, Run and type Control keymgr.dll
  • Remove the entries from the list.

Thursday, April 8, 2010

HOWTO: VMware View - Unassign user from a persistent desktop

1. Log onto View Manager Server
2. From a Command Prompt > C:\Program Files\VMware\VMware View\Server\bin>vdmadmin -L -d POOLNAME -m Virtual Machine Name -r

eg. vdmadmin -L -d SOEPool -m SOE1 -r

3. You should then see "Sucessfully removed owner from specified machine." If you don't check the syntax

Sunday, March 14, 2010

HOWTO: Create two software configurations for different versions of an application

Products

  • BlackBerry® Enterprise Server for IBM® Lotus® Domino®
  • BlackBerry® Enterprise Server for Microsoft® Exchange


Environment

  • BlackBerry® Enterprise Server version 4.1 SP6 for Microsoft® Exchange
  • BlackBerry® Enterprise Server version 4.1 SP6 for IBM® Lotus® Domino®


Overview

When creating a software configuration on the BlackBerry Enterprise Server you receive the following error:

Multiple instances of the following applications were found. Please remove all but the desired version to enable the applications for configuration.



Cause

The issue occurs when trying to create a software configuration for an application that has multiple versions created for different BlackBerry smartphones. For example, the BlackBerry® Client for use with Microsoft® Office Communications Server 2007 v2.2 is designed for the BlackBerry® Storm™ Series only. The BlackBerry Client for use with Microsoft Office Communications Server 2007 v2.1 is designed for BlackBerry smartphones that do not use the SurePress™ touch screen.



Resolution

Use the following process to create a second shared folder within C:\Program Files\Common Files:

  1. Open My Computer and select the drive that hosts the BlackBerry Enterprise Server (C:\ by default).
  2. Double-click on Program Files, then Common Files.

    Note: A folder must be created that uses the same folder structure as the Research In Motion folder.

  3. Create a folder called RIM in the Common Files folder, then copy the AppLoader folder from the Research In Motion folder to the RIM folder.
  4. To share the RIM folder, complete the following steps:
    1. Right-click on the RIM folder, then select Sharing and Security.
    2. Select Share this folder.
    3. Click Apply.
    4. Click OK.
  5. Create a folder within the RIM folder called Shared, then create a folder called Applications within the Shared folder.
  6. Copy the .cod and .alx files for the second application to the new Applications folder
  7. Open a command prompt by clicking Start >Run, type cmd, then click OK.
  8. Go to the directory within the RIM folder (for example: cd C:\Program Files\Common Files\Rim\AppLoader).
  9. Run the command loader.exe/index.
  10. In BlackBerry Manager, click the Software Configurations tab.
  11. In the Common Tasks menu, select Add New Configuration. In the Configuration Name field, type a name for the configuration.
  12. Click Change to input the Universal Naming Convention (UNC) path to the shared folder.
  13. Type \\\.
  14. Application Software should appear in the window, expand the window to see the new software configuration.