Vista rule of thumb - Don't mix and match privileges between VS and Device Emulator
Several of you device developers out there, might be running Device Emulator (or Device Emulator Manager) from your command prompt. And if your command prompt is "running as administrator", you need to know a few things.
- When you launch the emulator from an administrator command prompt, it runs with an "elevated" privilege (corollary: emulator or manager launched from a normal command prompt will run "unelevated").
- Now if you try to list your running emulators, either programmatically or via Device Emulator Manager, you need to ensure that the Manager is also running with the same privileges as the emulator. Otherwise, your emulators will not be listed in the manager's window.
- If you install Visual Studio (with the VS2005 SP1 Update for Vista), run VS in "normal" mode, and then launch device emulator manager from the VS Tools menu, then Device Emulator manager will also run "unelevated" (i.e., the manager application uses the same privileges as VS). Now, if you connect-to and cradle emulators from the manager UI, these emulators will also run "unelevated".
The emulator is a COM server, and any running emulator that registers itself in COM's Running Object Table (ROT) when you are running as a "normal" user will not be visible to you when running with "elevated" permissions and vice-versa. So, "don't mix and match", is a good rule of thumb for all things elevated and unelevated.
Note: The same logic applies also when you are connecting Visual Studio Remote Tools (File Viewer, Registry Editor, etc.) to your emulator. Keep privileges the same.