---- "Castro wrote: > > Hmm... I see a problem. I don't want my bootstrapper to run as admin, so it > > won't have access to the protected areas like Program Files. The reason I > > don't want to run as admin is because then it won't be able to launch stuff > > on > > behalf of the logged in user (which may be different from the admin). This > > is > > getting hairier and hairier. > > Don't worry about launching a program as the logged in user. This can be done > in Windows Installer (and thus WiX) fairly easily. When a MSI is launched the > Windows Installer engine executes the InstallUISequence and the > InstallExecuteSequence in the context of the logged on user. The purpose of > the InstallUISequence is to gather information from the user. The purpose of > the InstallExecuteSequence is to schedule the actions that will change the > system (producing an install script). The Windows Installer engine then gives > the generated install script to a server-side process that runs under the > appropriately elevated privileges to change the system. You can specify > whether you want custom actions to impersonate the logged on user. When you > specify the program to launch at the end of your install, you'll just need to > specify that you do want it to be impersonated. The standard WiX UI provides > a built-in mechanism to launch programs in this fashion at the end of the UI.
Yes, I understand that now. Before I was using a Visual Studio setup project, which doesn't give you the "impersonation" option for custom actions. Because of that my program got launched as SYSTEM, and was unable to work with the normal Explorer process. > What bothers me is that you are deciding whether your installer will need > admin privileges or not based on your decision to launch an executable. The > installer should dictate whether you need admin privileges or not depending > on whether you _need_ to modify protected system resources (such as > ProgramFiles). If the program should be installed on a per-user basis (ie, > multiple times per system, if there are multiple users on the system) then > you should install the application in the user's profile _and_ maintain > per-user configuration. If you need to install only once per system, and > maintain only a single system-wide configuration, and the program should be > available to all users, then you should install in ProgramFiles (requiring > admin privileges). I'm talking about the bootstrapper, not the installer. Correct me if I'm wrong: If the bootstrapper A runs as admin, then the installer B (as a child process) will run as admin. If the installer B runs as admin, then it won't be able to launch my application C as non-admin. So I want to run A as the current user to make sure that C runs as the current user. Does that make sense? ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users