Welcome to MSDN Blogs Sign in | Join | Help

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.

  1. 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").
  2. 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.
  3. 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.

Published Tuesday, March 13, 2007 2:05 AM by anandba

Comments

Monday, March 19, 2007 12:34 AM by Nino.Mobile

# The Mobile Minute 156

Software / Hardware Loke has a very handy WM5/WM6 feature guide CoolSmartPhone.com is reporting that

Monday, March 19, 2007 4:33 AM by DanielMoth

# re: Vista rule of thumb - Don't mix and match privileges between VS and Device Emulator

Yup.. this bit me last December "on stage" and I blogged about the error you are likely to face:

http://www.danielmoth.com/Blog/2006/12/more-on-device-development-on-vista.html

Anonymous comments are disabled
 
Page view tracker