gclass
21st March 2012 14:34 UTC
win7/vista install template
Hi
I am about to write for the first time uninstall data to the registry.
the installer just need to place a file and create desktop and start menu short cuts.
I looked for some information, and found this template:
http://nsis.sourceforge.net/Sample_i...an_application
and this one as for the permission level:
http://nsis.sourceforge.net/Shortcut..._Windows_Vista
I wonder if this will cover all and the installer will have the most chances to work properly on most machines?
or if there is a template I can learn from?
thx
G
Afrow UK
21st March 2012 19:22 UTC
If you require administrator access for installation you still need to check the user is an administrator using the UserInfo plug-in (as that page states). You need administrator access if your shortcut will be placed for all users, you are writing to HKLM registry or you are writing files to Program Files or Windows. If you are not writing to any of these locations (uninstall registry can go in HKCU), you can just use RequestExecutionLevel user.
But yes, that is enough to ensure a standard installation will work on all Windows versions (including Windows 8) *.
* that can execute 32-bit programs I should add :)
Stu
gclass
23rd March 2012 12:53 UTC
Hi Stu,
Thank you for your kind reply :)
I managed to code it properly and it is working as expected on xp,vista and 7.
thinking about admin permissions, I wonder how "appropriate" it is to install software to c:\somefolder and place desktop shortcut in case NSIS do not get admin privileges?
thx
Afrow UK
23rd March 2012 13:46 UTC
You can't write to C:\somefolder without admin privileges. The only folder you can write to is the user's profile folders, such as $APPDATA. This is where you would install to for per-user installs, create per-user shortcuts and write HKCU uninstall registry.
Stu
gclass
23rd March 2012 14:04 UTC
thanks Stu,
really helpful and useful
:)