|
|
#1 |
|
Junior Member
Join Date: Jan 2007
Location: France
Posts: 5
|
Vista/Win7, and UAC control
Hi from a french guy, (Hope you can understand what I want ...)
I have a question, and I don't find anwser anywhere. I user RequestExecutionLevel=user, so the UAC is not launched when the installer starts. But with user lever, the soft can't be installed in "program files" If I use "admin" level, UAC prompt for password, and then NSIS can install my soft in Prg files But with this level, at the end of install, if the user choose to launch the soft, it is launched with admin rights, and not user right. And my soft save datas in user profile, so at the firt start after install, datas are saved in the admin profile, and the user don't find them when he wants to user the soft another day. Is there a way to install soft with UAC in program files, and then launch soft at the end of install with user rights ? Thanks for your help. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
the easy way: disable the run checkbox
the hard way: use the UAC plugin IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2007
Location: France
Posts: 5
|
![]() Well, I have a look at UAC plugin, but I don't like the fact that it is the install that prompt for the admin password ... It may be not appears as very safe for the user. So, I will use the first method. An other question: if I use a ExecShell function, does it run with admin rights, or user rights "from the shell" ? In the second cas, it could be a great things, no ? |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
The program you execute with ExecShell will be run at the same level as the installer that executed it. Just like with Exec, ExecWait, nsExec or any other method of executing programs.
(Expect for the CallAsUser function in the UAC plugin, but like Anders hinted that's a world of pain.) |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jan 2007
Location: France
Posts: 5
|
Right. I disable the finispage_run, and that' all!
(And may be this issue can be fixed in a future version of NSIS, I saw in other post that I'm not the only one to have this problem ...) Thanks for you help
|
|
|
|
|
|
#6 |
|
Major Dude
Join Date: Mar 2003
Posts: 571
|
I have found that the UAC plugin works very well. It lets my installer do some things as an administrator and some as a standard user. I had to spend some time experimenting with the UAC plugin but soon found it suits my needs very well.
As far as I am concerned the "world of pain" mentioned elsewhere in connection with the UAC plugin is an exaggeration. |
|
|
|
|
|
#7 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
Of course it is an exaggeration, but for NSIS newbies it most definitely is pain. Also I'll add that most people using the UAC plugin are NOT using it the way they should. It's a more complex problem than most people think or realize.
|
|
|
|
|
|
#8 | |
|
Major Dude
Join Date: Mar 2003
Posts: 571
|
Quote:
Once I took the time to write a few simple test programs and looked at what happened when I ran them I was able to see where I had gone wrong. |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|