tags:

views:

124

answers:

4

I have a WPF application that runs fine under XP as an administrator.

When I run as a limited user the application does not run at all, I get the hour glass for a half second and then nothing.

Where do I start in working out what part of my application is causing it to crash when running under a limited user account?

+4  A: 

I usually fire up ProcMon and watch what registry/files are opened/read/written. ProcMon shows also if the operation succeeded or failed. That helps me pinpoint the first 80% of the problems.

The usual problems are attempted writes to \Windows, \Program Files and the HKLM registry hive.

A good resource here is the Non-Admin blog.

Piskvor
Thanks that pointed me straight at the problem (my app was trying to load a file that was created by another account).
Brownie
A: 
  1. Add log code to your app. And see where it crashes/hangs
  2. Start "eventvwr", see if anything weird is in the system logs
  3. Try to develop/debug as a normal user
GvS
+2  A: 

Try logging you first steps of you application. Create a try/Catch block in the static main, that catches every exception and prints it to a logfile.

You should look into the eventlog, too.

BeowulfOF
Good thought. Am going to dig into where WPF is generating that main method so I can catch the errors. I think by default the main method is generated behind the scenes.
Brownie
+1  A: 

Check if the limited account has enough permissions on the dlls or assemblies your application is using. To resolve this, you would need to give the account execute permissions on all of the required assemblies.

Lonzo