The OEM Ready Program and RMTool.exe

On the The OEM Ready Program page, OEM’s can download the OEM Ready Program Test Cases for Windows Vista.

 

The 7th test is to verify that the application is Restart Manager Aware. To test this, you must use RMTool.exe but where do you get it from? Mentioned in the appendix of the document is a link to the Vista Logo Tools.

Once installed:

 

gci 'C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows' -r | % { if (!$_.PSIsContainer) {$_.Fullname}}
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\CreateLogoUsers.cmd
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\Logo Testing Tools for Windows.rtf
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\RegDiff\filter
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\RegDiff\RegDiff.exe
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\RegDump\RegDump.exe
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\Restart Manager\AMD64\RMTool.exe
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\Restart Manager\x86\RMTool.exe
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\RollBack\InjectFailure\failhere.DLL
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\RollBack\InjectFailure\FailInstallFromCommitCustomAction.msm
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\RollBack\InjectFailure\FailInstallFromDeferredCustomAction.msm
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\ThreadHijacker\AMD64\threadhijacker.exe
C:\Program Files (x86)\Microsoft Corporation\Logo Testing Tools for Windows\ThreadHijacker\x86\threadhijacker.exe

If you want to test an application (e.g. Notepad++):

[50] rmtool /?

RMTool.exe [-l] [-p PID] [-f file] [-s svc] [-i file] [-F] [-S] [-R] [-A]

        -p PID Process id to register with Restart Manager
-f file File to register with Restart Manager
-s svc Service to register with Restart Manager
-i file Read files to register from specified file (must be unicode)
-w n Wait n sec before starting pass.
-F Force shutdown
-A Shutdown only if all apps restartable
-S Shutdown applications.
-R Restart applications. (includes -S)
-l[rofw] Logoff or shutdown saving app state.
r - Reboot the machine.
o - Turn the machine off.
f - Operate forcefully.
w - Use ExitWindows() instead of InitiateShutdown().

    By default RMTool will only query information about
affected processes. Use the -S,-R flags to enable

    shutdown/restart behaviors.

        Note: You can specify up to 25 items of each type
to register. To add multiple items, repeat the flag
and item specifier.

                Eg. RMTool.exe -p 123 -p 456 ...

[51] (ps -Name Note*).Id3780

[52] rmtool -p 3780 –SStarting Session
StartSession() returned 0
SUCCESS: StartSession()
Session Key: 56feb14b111fd340b6d872d72d4e8ca6?
Registering file
RegisterResources() returned 0
SUCCESS: RegisterResources()
Getting affected apps.
RmGetList() needs 1 structs, reboot reasons 0, returned 0xea
SUCCESS: Allocating RM_PROCESS_INFO array
SUCCESS: GetAffectedApps()
My PID: 3624, Affected Apps: 1, needed 1, reboot reasons 0
PID(1:3780, type 1, stat 1) - Notepad++ : a free (GNU) source code editor ()
Shuting down applications
SUCCESS: RmShutdown()
Getting affected apps.
RmGetList() needs 1 structs, reboot reasons 0, returned 0xea
SUCCESS: Allocating RM_PROCESS_INFO array
SUCCESS: GetAffectedApps()
My PID: 3624, Affected Apps: 1, needed 1, reboot reasons 0
PID(1:3780, type 1, stat 2) - Notepad++ : a free (GNU) source code editor ()
Ending Session
EndSession() returned 0
SUCCESS: EndSession()

Resources in case you want to do more than follow the basic requirement:

1. Restart Manager

2. Restart Manager in Vista for developers

3. Windows Installer and Restart Manager: MSI Files-In-Use V2

4. (Re-)Start Me Up ...

À demain, si on le veut bien…