|
|
#1 |
|
Junior Member
Join Date: Oct 2007
Posts: 1
|
Overwrite confirmation
Hi,
I'm writing a really simple installer. Basically, its purpose is to copy a few files to different locations on the drive. I could of course do this by batch scripting, but I want it to look nice. One thing I haven't figured out is, how do I make the installer prompt the user to "OK" an overwrite. The way I see it, you have either a overwrite mode or a no-overwritemode, but both are without user interaction. Any help or hits here would be appreciated. JF |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Either check if the file exists with IfFileExists or ${If} ${FileExists} or wrap it with SetOverwrite try and IfErrors. In both cases, you can put the code in a macro for simpler usage.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
|
How about using a message box? Turn the overwriting on and then make the box pop up asking if the user wants to overwrite the files. Then if the user says yes overwrite, and if not skip that section.
Something kinda like this: MessageBox MB_YESNO|MB_ICONQUESTION "Do you want to overwrite the files" IDYES overwrite IDNO skipoverwrite overwrite: ; overwrite all the files skipoverwrite ; proceed with install without overwriting files Hope it helps From there to here, from here to there, funny things are everywhere. Dr. Seuss "One Fish Two Fish Red Fish Blue Fish" |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|