Swapan Das
11th January 2007 12:00 UTC
Add System Info to my uninstaller in Windows Add/Remove Program
Hello Everybody,
Friends I'm on finalization stage of my installer, so I'm bouncing so many posts in the forum. Thanks for all the support.
Now to my new issue. I want to add Support Info to my product, when the user tries to remove/uninstall it from Windows Add/Remove program. Hope most of you've noticed that all products displayed there generally carries Support Info.
Currently my product shows two informations:
Publisher:XYZ Ltd.
Version: 5.0
User can click the XYZ Ltd. to visit to the site of XYZ Ltd.
So far it is ok. Although I'm not sure how are they coming!
Is it for the following coding:
!define PRODUCT_NAME "MyApplication"
!define PRODUCT_VERSION "5.0"
!define PRODUCT_PUBLISHER "XYZ Ltd."
!define PRODUCT_WEB_SITE "http://www.xyz.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\MyAppl.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
Section -Post
; Write the installation path into the registry
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\MyApp.exe"
; Write the uninstall keys for Windows
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\MyApp.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
WriteUninstaller "$INSTDIR\uninst.exe"
SectionEnd
If it is so, then there must be other reserved constants for :
Support Information
Product Updates
Registered Company
Registered Owner
How can I accomplish this?
Thanks for reading this. Any idea?
With regards,
Red Wine
11th January 2007 12:11 UTC
Support Information
Product Updates
Registered Company
Registered Owner
Simply you have to define these info and then add them to the registry.
e.g.
!define Product_Updates 'http://www.myserver.com/updates'
.......
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Product Updates" "${Product_Updates}"
Swapan Das
11th January 2007 13:44 UTC
Red Wine thanks for the prompt reply.
But its not working for me. I'm using Windows XP.
What's wrong in the code:
!define Product_Updates "http://www.xyz.com"
!define Support_Information "techsupport@xyz.com"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Support Information" "${Support_Information}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Product Updates" "${Product_Updates}"
Still only Publisher and Version info is coming. Please Help!
Swapan Das
11th January 2007 13:49 UTC
Oh I forgot to ask one more thing regarding this!
Are these NSIS defined constants? Then can you tell me the link for the documentation where I can find all the NSIS defined constants for all these uninstall routine.
Red Wine
11th January 2007 16:10 UTC
See NSIS manual 5.4.1 !define and 4.2.3 Constants
Red Wine
11th January 2007 18:22 UTC
Red Wine thanks for the prompt reply.
But its not working for me. I'm using Windows XP.
What's wrong in the code:
!define Product_Updates "http://www.xyz.com"
!define Support_Information "techsupport@xyz.com"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Support Information" "${Support_Information}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Product Updates" "${Product_Updates}"
Still only Publisher and Version info is coming. Please Help!
!define Product_Updates "http://www.xyz.com"
!define Support_Information "techsupport@xyz.com"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "HelpLink" "${Support_Information}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${Product_Updates}"
you may also try WriteRegExpandStr instead of WriteRegStr.
For Registered Company - Registered Owner you need to read these values from registry.
Swapan Das
12th January 2007 06:16 UTC
Thanks Red Wine! This time it worked.
These variables like 'URLUpdateInfo' is not of NSIS, its of the Os-Windows.Right?
For friends who have come to this thread for this issue may also refer to the following link:
http://nsis.sourceforge.net/Add_unin...emove_Programs
That's all. Cheers!
Regards,
Red Wine
12th January 2007 06:32 UTC
These variables like 'URLUpdateInfo' is not of NSIS, its of the Os-Windows.Right?
These and several more I found in a windows installer (msi) database :)