Old 21st March 2012, 12:34   #1
gclass
Junior Member
 
Join Date: Mar 2011
Posts: 26
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
gclass is offline   Reply With Quote
Old 21st March 2012, 17:22   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 23rd March 2012, 10:53   #3
gclass
Junior Member
 
Join Date: Mar 2011
Posts: 26
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
gclass is offline   Reply With Quote
Old 23rd March 2012, 11:46   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 23rd March 2012, 12:04   #5
gclass
Junior Member
 
Join Date: Mar 2011
Posts: 26
thanks Stu,
really helpful and useful
gclass is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump