# programma di installazione MemIcons by Babba
# definisco il nome
Name "MemIcons"
# exe da produrre
OutFile "MemIcons.exe"
# cartella di installazione
InstallDir $PROGRAMFILES\MemIcons
# setto le icone
Icon MemIcons.ico
UninstallIcon MemIcons.ico
# sezione start
Section
# setto il path di outpout
SetOutPath $INSTDIR
# specifico quali files copiare
File LAYOUT.DLL
CopyFiles LAYOUT.DLL $SYSDIR\LAYOUT.DLL
# nome dell'uninstaller
WriteUninstaller $INSTDIR\MemIconsUninstaller.exe
# creo le voci di menu
CreateDirectory $SMPROGRAMS\MemIcons
CreateShortCut "$SMPROGRAMS\MemIcons\MemIcons Uninstall.lnk" "$INSTDIR\MemIconsUninstaller.exe"
# scrivo un po di chiavi nel registro
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MemIcons" \
"DisplayName" "MemIcons :: by Babba (www.ongari.it)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MemIcons" \
"UninstallString" "$INSTDIR\MemIconsUninstaller.exe"
WriteRegStr HKCR "CLSID\{19F500E0-9964-11cf-B63D-08002B317C03}" \
"" "Posizione icone desktop"
WriteRegStr HKCR "CLSID\{19F500E0-9964-11cf-B63D-08002B317C03}\InProcServer32" \
"" "Layout.dll"
WriteRegStr HKCR "CLSID\{19F500E0-9964-11cf-B63D-08002B317C03}\InProcServer32" \
"ThreadingModel" "Apartment"
WriteRegStr HKCR "Folder\shellex\ContextMenuHandlers\IconLayout" \
"" "{19F500E0-9964-11cf-B63D-08002B317C03}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" \
"{19F500E0-9964-11cf-B63D-08002B317C03}" "Posizione icone desktop"
SectionEnd
# sezione uninstall
Section "Uninstall"
# prima di tutto rimuovere sempre l'uninstall
Delete $PROGRAMFILES\MemIcons\MemIconsUninstaller.exe
# cancello i files
Delete $SYSDIR\LAYOUT.DLL
Delete $INSTDIR\LAYOUT.DLL
Delete "$SMPROGRAMS\MemIcons\MemIcons Uninstall.lnk"
# rimuovo le directory
RMDir $SMPROGRAMS\MemIcons
RMDir $PROGRAMFILES\MemIcons
# rimuovo le chiavi di registro scritte
DeleteRegValue HKCR "CLSID\{19F500E0-9964-11cf-B63D-08002B317C03}\InProcServer32" "ThreadingModel"
DeleteRegValue HKCR "CLSID\{19F500E0-9964-11cf-B63D-08002B317C03}\InProcServer32" ""
DeleteRegKey /ifempty HKCR "CLSID\{19F500E0-9964-11cf-B63D-08002B317C03}\InProcServer32"
DeleteRegValue HKCR "CLSID\{19F500E0-9964-11cf-B63D-08002B317C03}" ""
DeleteRegKey /ifempty HKCR "CLSID\{19F500E0-9964-11cf-B63D-08002B317C03}"
DeleteRegValue HKCR "Folder\shellex\ContextMenuHandlers\IconLayout" ""
DeleteRegKey /ifempty HKCR "Folder\shellex\ContextMenuHandlers\IconLayout"
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{19F500E0-9964-11cf-B63D-08002B317C03}"
DeleteRegKey /ifempty HKLM "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MemIcons"
SectionEnd
Vi rimando cmq al sito di NSIS e alla comunity dove troverete un sacco di esempi, tutorials e plugin per creare i vs. setups.