How to change the bitmap image when uninstalling the NSIS installer - nsis

How to change the bitmap image when uninstalling the NSIS installer?
Because here I didn't find any ID.
When installing the NSIS installer, I changed the bitmap image of the welcome screen using the below code:
!define MUI_WELCOMEFINISHPAGE_BITMAP "\NULLSOFT\src\Bitmaps\uninstwiz.bmp"
Similarly please suggest me how to change the bitmap image when uninstalling the software.

!define MUI_UNWELCOMEFINISHPAGE_BITMAP "c:\myfiles\uninstwiz.bmp"
!include MUI2.nsh
...
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
!insertmacro MUI_LANGUAGE "English"

Related

Launch wrapped exe with NSIS installer on windows startup

I am creating an installer that is wrapping an abc.exe with it. This installer is running the exe as a tray icon. But when I restart my system this exe will stop and won't be seen in tray icon anymore. I want this exe to be started again on windows restart. How can this be achieved?
I have tried below commands but not helpful:
CreateShortCut "$SMPROGRAMS${abc}.lnk" "$INSTDIR\abc.exe"
CreateDirectory "$SMPROGRAMS\abc"
CreateShortCut "$SMPROGRAMS\abc\abc.lnk" "$INSTDIR\abc.exe"
CreateShortCut "$DESKTOP\abc.lnk" "$INSTDIR\abc.exe"
CreateShortCut "$SMPROGRAMS\abc\Uninstall abc.lnk" "$INSTDIR\uninstall.exe"
Any help is appreciated!!!Thanks in advance
Windows does not know that the application is always supposed to run, you need to register it in the correct location.
CreateShortcut "$SMSTARTUP\MyApp.lnk" "$INSTDIR\abc.exe"

How to copy and install a dll into assembly folder using NSIS on an Windows OS with elevated UAC

I am building an application setup where the installation involves copying and registering Microsoft.VisualBasic.PowerPacks.Vs into the Windows assembly folder. This process sometimes fails on a Windows 7 system where the UAC is active.Currently, i use the following script in a section:
SetOutPath $INSTDIR\bin
File "..\MyFolder\systemfiles\Microsoft.VisualBasic.PowerPacks.Vs.dll
ExecWait '"$R0\RegAsm.exe" Microsoft.VisualBasic.PowerPacks.Vs.dll'
Requesting to kindly provide me some script/solution to successfully copy and register the dll even when the UAC is elevated on a Windows 7 system
All NSIS installers should contain a RequestExecutionLevel attribute, it is inspected by Windows Vista and later when UAC is on.
Your installer needs to request administrator privileges when you are installing things in GAC, SxS etc:
Outfile RequireAdmin.exe
RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
!include LogicLib.nsh
Function .onInit
UserInfo::GetAccountType
pop $0
${If} $0 != "admin" ;Require admin rights on NT4+
MessageBox mb_iconstop "Administrator rights required!"
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
Quit
${EndIf}
FunctionEnd
Page InstFile
Section
SectionEnd

Configuring InstallShield for customized uninstallation of installer

How do I configure my InstallShield setup project, so that when I uninstall my application, it should just uninstall the application and should not remove the fonts and .reg file that were also installed when I installed the application. I am using InstallShield Professional version to create my installer.
Set msidbComponentAttributesPermanent (or simple permanent) attribute for components which related to font files and to .reg file.
You can do it directly in Component table or in InstallShieldIDE.

Install DotNet Framework 2.0 and Vc++Redist 2008 using NSIS

I have an application setup made using NSIS. The application needs DotNet 2.0 and VC++Redist 2008 to run. Currently i am installing these dependencies separately.I need a way to install DotNet Framework and Vc++Redist 2008 from within my NSIS Scirpt if not present on the system(if present installer should skip the dependencies). Need some piece of script and a step by step procedure to do this. Kindly help.
Thanks,
You should try the search engine before asking a question that was already asked, here and on the NSIS wiki:
how to detect if CV redist is installed (for VC2005)
how to detect VC2008 redist (to get the specific vc2008 class id)
Also:
How to perform a silent install of the Visual C++ 2008 redistributable packages.
Basically you need something like
ExecWait '$TEMP\vcredist_x86_SP1.exe /Q' $0
DetailPrint "-- vcredist_x86_SP1.exe runtime exit code = '$0'"
How to check for an installed version of dotnet
Embedding other installers with exemples for dotnet, and other third party components

nsis: How do I create a start menu shortcut to open a folder?

My NSIS installer creates Start Menu links to run and uninstall my application.
Using NSIS, how do I create StartMenu shortcut to open a folder in Windows Explorer?
the same as any other shortcut
CreateShortcut "$smprograms\my app\my shortcut.lnk" "c:\path\to\folder"
this is explorer 99% of the time, and its really what you want, but if you want to force explorer
CreateShortcut "$smprograms\my app\my shortcut.lnk" "$windir\explorer.exe" '/e,"c:\path\to\folder"'
but that shortcut will have the wrong icon etc

Resources