Hey Gang,
Running into a problem that I can't seem to find info about anywhere.
Basically, I have a .NET app which has a setup project that creates a setup.exe for me. I can deploy this on a test machine and, as long as I install *and* run as admin, all works well. But if I install the app as admin, but run as a limited user (I'm talking
the XP pre-defined "roles" here) the app won't run.
My co-worker had previously removed the default page of the setup wizard to automatically install the setup for all users. So it should already be doing this, but perhaps it's not.
I've been looking through MSDN help, and I even googled, but I can't find what I need to change in the setup project to make this work. Any pointers?
Thanks.
-Chuck
-
-
What's the nature of the issue? Does the app not show up on the Start/[All] Programs menu? Does it not start up at all? Does it run, and then crash? Does the application throw an exception or anything else that could clue you in to what's going on?
Sorry, but "doesn't run" can mean a lot of things to a lot of people. -
Okay, guess I deserved that, here are more details.
No icon on the desktop for the other users. When running the app, the app can't write to the app.config file (we're using the Configuration Application block), which is obviously some kind of permission issue. I've got to run it again in my VPC to recall the startup issues, but I do recall that shutting down the app can't write to our app.config file.
<Edit> Specifically, I'm getting a "can't write to registry" error and an error stating it can't write to our config file in the app install directory.</Edit>
My point should have been that it's *not* being installed for all users and I need to figure how to fix it. I'd like to see an icon at the very least - there's no group for anyone but the installer. After that works, then I'll try to tackle the security problem(s).
-Chuck -
Sounds like you're running into Full Trust / Partial Trust problem. I dont know enough about .Net's Security Model but something is conflicting with the limited access that the non-admin account has (obviously).
Ok,i'm not sure anything I said here is new to you
I'll shut up now. -
Sorry if I sounded like a jerk in my last post - I was just trying to get more info.
I'm guessing that your application installs to Program Files? By default, users do not have permission to write to Program Files, so the app.config is read only to them (and the program, since it runs under the user's context).
The same goes for the registry. By default, I believe only the HKEY_CURRENT_USER key is open to a user, so if you're writing to HKEY_LOCAL_MACHINE, you're going to get an access denied.
The setup program should be copying files to Doc and Settings/All users/Start Menu/Programs to make it available to all users, and Everyone should have Read on the folder/files. Is that the case?
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.