Posted by: rcosic | 15/02/2008

Vista Gold Certification – RM-aware applications

Image Hosted by ImageShack.us

As an ending of this story, I want to mention that the reacting on Restart Manager, that is, creation of environment for the application recovery is the prerequisite for application to get prestige Vista Gold Certificate. Alas, test number 30 speaks about that, so do read the following, if you are interested about that:

Certified for Windows Vista Test Cases

Is the application ready to satisfy the criteria to pass the test no. 30, it’s easy to demonstrate following the suggested instructions (Microsoft):

1. Launch the application.
2. Open Windows Task Manager
a. Click on Processes tab
b. From the View menu select columns
c. Check PID (Process Identifier) check box and click OK to add the PID column to Windows Task Manager
d. Click Image Name to list processes by name
e. Find the application image name and make note or the PID
3. Open command window.
4. Change directories to the directory that contains the Restart Manager Tool.
5. From the command window inject a shutdown message to the application through the RMShutdown API in the following manner:
a. If the application is designed to shutdown and restart; type “rmtool.exe –p dwPID –S –R” (dwPID is the application’s Process ID and can be obtained via task manager) this will force the application to shutdown and restart.
b. Make a note if the application does not shutdown and restart
c. If the application is not designed to restart after shutdown; type “rmtool.exe –p dwPID –S” this will force the application to shutdown only
d. If your application is a service and is designed to restart after shutdown; type “rmtool.exe –f $dir –S –R” ($dir is the path to the service executable or dll) this will force the application to shutdown and restart.
e. If your application is a service and is not designed to restart after shutdown; type “rmtool.exe –f $dir –S” ($dir is the path to the service executable or dll) this will force the application to shutdown only.
f. Open Event Viewer by typing eventvwr from the command line or from the Administrator Tools.
i. Expand Windows Logs
ii. Click on Application
iii. There will be a RestartManger (Information) message for each Shutdown and Restart action performed by Restart Manager on each executable.
a. The shutdown message will contain the executable name and ProcessID in the log.
b. The restart message will contain the executable name and ProcessID in the log, with the ProcessID being different then the shutdown log. This log will have a later time stamp

VERIFICATION:

1. Using the Restart Manager Tool the application was able to be shutdown via the RMShutdown API quietly without user interaction while idle and restarted if the application was designed to restart after shutdown.
2. If the application is a service; using the Restart Manager Tool the service was able to be shutdown via the RMShutdown API quietly without user interaction whole idle and restarted if the service was designed to restart after shutdown.
3. There must be both an Information message with “Source” listed as RestartManger for each shutdown and restart action performed by Restart Manager in the Windows Application Logs on each executable above in order to pass this test case.

NOTES:

1. The application must be idle and must not be running or performing any operations while performing this test case.
2. All applications must listen and respond to shutdown messages using the Restart Manager API quietly without user interaction while idle in order to pass this test case.
3. The application or service must not cause an Access Violation and shutdown/restart safely in order to pass this test case.
4. Restart Manager shutdown messages are:
a. WM_QUERYENDSESSION with LPARAM = ENDSESSION_CLOSEAPP(0x1): GUI applications must respond (TRUE) immediately to prepare for a restart.
b. WM_ENDSESSION with LPARAM = ENDSESSION_CLOSEAPP(0x1): The application must shutdown within 5 seconds (20 seconds for services).
c. CTRL_SHUTDOWN_EVENT: Console applications must shutdown immediately.
5. If the application or service is not designed to restart after shutdown, then there will only be an Information message with “Source” listed as RestartManger for each shutdown action performed by Restart Manager in the Windows Application Logs on each executable above.

I’ve tried and it really writes mentioned entries in the EventLog. So, the test has been passed!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: