http://ionipti.blogspot.com/2010/08/gvim-73-64-bit-x64-windows-7-vista-xp.html
I have been asked over facebook to build gvim 7.3 with silent install and uninstall options. I have modified gvim.nsi to do that. The changes to gvim.nsi are below.
You can download the actual installer with silent support from: http://nkcorner.com/gvim73S.exe
Silent installs with all of the defaults.
---
MessageBox MB_YESNO|MB_ICONQUESTION \
"This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer.$\n Continue?" \
/SD IDYES IDNO DoAbort
Goto NoAbort
DoAbort:
Abort ; causes installer to quit.
---
MessageBox MB_YESNO|MB_ICONQUESTION \
"The installation process has been successful. Happy Vimming! \
$\n$\n Do you want to see the README file now?" /SD IDNO IDYES YesReadme
Goto NoReadme
YesReadme:
Exec '$0\gvim.exe -R "$0\README.txt"'
---
MessageBox MB_OK|MB_ICONINFORMATION \
"Vim ${VER_MAJOR}.${VER_MINOR} has been (partly) removed from your system" /SD IDOK
FunctionEnd
---
MessageBox MB_YESNO|MB_ICONQUESTION \
"Would you like to delete $0?$\n \
$\nIt contains the Vim executables and runtime files." /SD IDNO IDYES YesRemoveExes
Goto NoRemoveExes
YesRemoveExes:
Delete /REBOOTOK $0\*.dll
---
MessageBox MB_YESNO|MB_ICONQUESTION \
"Remove all files in your $1\vimfiles directory?$\n \
$\nCAREFUL: If you have created something there that you want to keep, click No" /SD IDNO IDYES NoFin
Goto Fin
NoFin:
RMDir /r $1\vimfiles
---
MessageBox MB_YESNO|MB_ICONQUESTION \
"Would you like to remove $0?$\n \
$\nIt contains your Vim configuration files!" /SD IDNO IDYES YesDelete
Goto NoDelete
YesDelete:
RMDir /r $0 ; skipped if no
---
Thanks a lot!
ReplyDeleteSilent installation works like a charme (except I have to manually delete desktop icons, but that's no problem).
ReplyDeleteUninstallation seems not to work:
C:\Program Files\Vim\vim73>uninstal.exe /S
This program will remove the following items:
- the "Edit with Vim" entry in the popup menu
which uses "C:\Program Files\Vim\vim73\gvim.exe"
Remove it (y/n)? n
- the "gVim 7.3" icon on the desktop
- the "gVim Easy 7.3" icon on the desktop
- the "gVim Read only 7.3" icon on the desktop
Remove them (y/n)?
n
- the "Programs\Vim 7.3" entry in the Start Menu
Remove it (y/n)? n
gvim.exe detected. Attempting to unregister gvim with OLE
You may now want to delete the Vim executables and runtime files.
(They are still where you unpacked them.)
Press Enter to exit...
C:\Program Files\Vim\vim73>
You have to uninstall with the NSIS uninstaller: uninstall-gui.exe.
ReplyDeleteC:\Program Files\Vim\vim73>uninstall-gui.exe /S
Thanks for the info.
ReplyDeleteThanks Nachum, it worked great!
ReplyDeleteOkay, this may be a stupid question, but why does it say that Vim has been "partly" removed from the system? How can I remove it completely? (Not that I don't want it. I'm going to install it again. I just messed it up a bit and want to start over.)
ReplyDeleteHi, what other parameter does the .EXE accept? I want to create a log file for the install and uninstall
ReplyDelete