Menu
Amazon WorkSpaces Application Manager
Administration Guide

Device Driver and Service Issues

The following are possible device driver and service issues.

How do I package drivers for Plug and Play devices?

Plug and play drivers for devices such as printers are installed in two phases:

  • Amazon WorkSpaces Application Manager Studio uses the installer to copy the driver files to the hard drive.

  • Windows associates the files with the correct device.

Starting with Vista, Windows uses a protected repository for trusted device drivers called the driver store. To set up a device drive, use a Configurable AppEvent that uses the pnputil.exe utility. This utility adds and removes drivers from the driver store. The syntax for adding drivers using the utility is:

pnputil.exe -i -a "C:\<folder>\driver.inf"

Warning

Do not attempt to set files in the driver store to Installed-permanent (layer 1) or Installed-temporary (layer 2) because it causes virtualization to fail.

To exclude device driver files

  1. In Amazon WorkSpaces Application Manager Studio, choose the Files tab on the top of the project pane.

  2. Open the context menu (right-click) for the <WindowsDir>\inf\ folder and choose Exclude.

  3. To exclude all virtual files used by the device driver, do the following:

    • On the instance desktop, do the following to open Device Manager:

      • Choose Start.

      • type devmgmt.msc and then press Enter.

    • Double-click the device driver in the list to open the Properties dialog box.

    • In Properties, choose the Driver tab and Driver Details, make note of the files listed in the Driver File Details dialog box, and then choose OK.

    • In Amazon WorkSpaces Application Manager Studio, choose the Files tab on the top of the project pane.

    • Open the context menu (right-click) for each file and choose Exclude.

  4. To exclude files for TWAIN devices, do the following:

    To exclude files for TWAIN devices

    1. In the Dashboard tab of Amazon WorkSpaces Application Manager Studio, select your project and choose Update on the toolbar.

    2. Choose the Files tab.

    3. For each driver file under <WindowsDir>\SSDriver, open the context menu (right-click) and choose Properties.

    4. In the Properties dialog box, choose Installed-temporary (layer 2) under Disposition and OK.

  5. In Amazon WorkSpaces Application Manager Studio, select your project on the top of the project pane, and then under 3. Optional settings, choose Settings.

  6. In Settings, choose Configurable AppEvents and Add.

  7. In the Configurable AppEvent Settings dialog box, choose After activation under Trigger.

    • In File name in Handler command line type %SystemRoot%\system32\pnputil.exe. Under Handler Launching, choose Run elevated (only supported on Windows Vista or later) and OK.

    Note

    Device drivers remain on the system even after the application has been removed by Amazon WAM Admin Player. This is expected behavior.

I cannot stop a service with a running status

Windows Task Manager tracks all executable files and services with Virtual-integrated (layer 3) or Virtual-isolated (layer 4) disposition. When the executable file or service is in use, Windows Task Manager shows this file with a Status value of Running.

To avoid usage tracking, set the disposition of these files (such as Service ImagePath) and services to Installed-temporary (layer 2) disposition.

In addition, some services may be configured to restart automatically after an interruption.

To configure an interrupted service to restart automatically

  1. In Amazon WorkSpaces Application Manager Studio, choose the Registry tab on the top of the project pane.

  2. Remove the Failure action key from the following hive for the service:

    Copy
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

My Windows services or drivers do not start

If a service needs to start using a unique user account (this normally defaults to LocalSystem), the application needs a Configurable AppEvent to create this account.

Warning

Some systems services have security descriptors that are strictly enforced. When adding a new service, it is important to match the security descriptor of the installed version. Use sc sdshow <service_name> at the command prompt to display the security descriptor set for the service. Marking an application to require a system restart after adding a service typically corrects the security descriptors.

If the application has boot or system drivers, mark all of the files and registry keys for those services or drivers as Installed-temporary (layer 2).

To set the disposition of the files and registry keys

  1. In Amazon WorkSpaces Application Manager Studio, choose the Services & Drivers tab.

  2. Open the context menu (right-click) for the service or driver and choose Service Key Disposition.

  3. In the dialog box, choose Installed-temporary (layer 2), and OK.

  4. Open the context menu (right-click) for the service or driver and choose Image File Properties.

  5. In the dialog box, choose Installed-temporary (layer 2), and OK.

    Warning

    Set both the files and registry keys to Installed-temporary (layer 2) disposition. You may have problems if the files and registry keys do not have the same disposition setting.

  6. On the Registry tab, open the context menu (right-click) for each legacy registry key for your service or driver and choose Exclude.

  7. Open the context menu (right-click) for each Enum registry key for your service or driver and choose Exclude.

    • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\Root

    • HKEY_LOCAL_MACHINE\ System\CurrentControlSet\Services\{NAME}\Enum

  8. On the Project tab, choose to allow or avoid a system restart. In 3. Optional settings, choose Settings, and then do one of the following in the Settings dialog box:

    To require a system restart

    1. Choose Virtualization.

    2. Under Special requirements, select Require system reboot and OK.

    To avoid a system restart

    Use a Configurable AppEvent to avoid a system restart.

    1. Choose Configurable AppEvents and Add.

    2. In the Configurable AppEvent Settings dialog box, choose After Launch under Trigger.

    3. In File name under Handler command line, type sc.exe start <driver_name> and OK.

For more information about how services work, go to How to create a Windows service in the Microsoft Knowledge Base.

Note

A system driver cannot be stopped and removed from a system without a reboot. Amazon WorkSpaces Application Manager Studio removes these files from the system but the driver is still loaded until a reboot occurs.