Skip to content
⌘ NSIS Forum Archive

Check for Admin and overwrite files if not in use...

2 posts

whatsyoursteezo#

Check for Admin and overwrite files if not in use...

So, I am sorry for these newb question, but I am wondering if the installer is capable of doing a couple things:
  1. Check if the user is Admin. If not, pop up a message and let the user know.
  1. Create a folder and unpack all files to that folder.
  1. If the folder and files exist, overwrite all of them. If the files are in use, ignore them.
  1. Run an EXE when finished.


It should be noted this needs to be done in as few clicks as possible. Ideally, I just want the user to double click the installer and have it immediately copy the files and open my exe file.
JasonFriday13#
1. NSIS installers request admin rights by default: http://nsis.sourceforge.net/Docs/Cha...executionlevel

2. http://nsis.sourceforge.net/Docs/Cha...reatedirectory and http://nsis.sourceforge.net/Docs/Chapter4.html#file

3. http://nsis.sourceforge.net/Docs/Cha...#asetoverwrite

4. http://nsis.sourceforge.net/Docs/Chapter4.html#exec

And the basics for writing a script file: http://nsis.sourceforge.net/Docs/Cha...tutscriptfiles.