Rem: Using WMI to Create Remote Interactive Processes
Starting with Win2K SP3, Microsoft inhibits the ability to create interactive processes on remote machines. Workarounds are possible, but you must exercise caution when using them.
May 4, 2003
I'm using the Windows Management Instrumentation (WMI) Win32_Process class's Create method to create an interactive process on remote computers. Listing 2 shows the script. (Note that I replaced our inhouse application with calc.exe.) This script works on workstations running Windows NT 4.0 but not Windows 2000 Professional. The puzzling part is that the script once worked on the Win2K Pro machines. Now, the interactive process starts on these machines and I can see it listed in Windows Task Manager, but the desktop no longer displays the UI. Do you have any idea what the problem is?
My guess is that you recently patched your Win2K Pro machines with Service Pack 3 (SP3). Starting with Win2K SP3, Microsoft has inhibited the ability to create remote interactive processes. Microsoft's argument is that remote interactive processes pose too great of a security risk.
You can work around this inability, but you must exercise caution. You can use the Win32_ScheduledJob class's Create method to schedule an interactive process a few seconds into the future, as Listing 3 shows. Just be aware the process will run under the context of the Local System account, which exposes additional security risks.
Another workaround is to use schtasks.exe (which I discuss in "Using WMI to Manage Scheduled Tasks," InstantDoc ID 38669) instead of the Win32_ScheduledJob class to schedule the task. That way, you can schedule the interactive process with the minimum credentials necessary for the application to work.
About the Author
You May Also Like