windows - Nsis delete folder & subfolder -- inside installer directory -


how can delete intel_xdx folder inside installer folder. intel_xdx folder have files & subdirectories inside it. script not working me not able delete intel_xdx folder.

i have added requestexecutionlevel admin inside script.

installer windows 7 pc.

; script generated hm nis edit script wizard.  ; hm nis edit wizard helper defines !define product_name "uimagician" !define product_version "1.0.3" !define product_publisher "dinesh guleria" !define product_web_site "http://www.vscp.org/" !define product_dir_regkey "software\microsoft\windows\currentversion\app paths\uimagician.exe" !define product_uninst_key "software\microsoft\windows\currentversion\uninstall\${product_name}" !define product_uninst_root_key "hklm"  ; mui 1.67 compatible ------ !include "mui.nsh"  ; mui settings !define mui_abortwarning !define mui_icon "fatbee_v2.ico" !define mui_unicon "${nsisdir}\contrib\graphics\icons\modern-uninstall.ico"  ; welcome page !insertmacro mui_page_welcome ; license page !insertmacro mui_page_license "uimagicianlicence.txt" ; directory page !insertmacro mui_page_directory ; instfiles page !insertmacro mui_page_instfiles ; finish page !define mui_finishpage_run "$programfiles\uimagician\uimagician.exe" !define mui_finishpage_showreadme "$programfiles\uimagician\readme.txt" !insertmacro mui_page_finish  ; uninstaller pages !insertmacro mui_unpage_instfiles  ; language files !insertmacro mui_language "english"  ; mui end ------  name "${product_name} ${product_version}" outfile "uimagician_setup.exe" requestexecutionlevel admin installdir "$programfiles\uimagician" installdirregkey hklm "${product_dir_regkey}" "" showinstdetails show showuninstdetails show   section "mainsection" sec01   setoutpath "$programfiles\uimagician"   setoverwrite ifnewer   file "uimagicianlicence.txt"   file "uimagician.exe"   createdirectory "$smprograms\uimagician"   createshortcut "$smprograms\uimagician\uimagician.lnk" "$programfiles\uimagician\uimagician.exe"   createshortcut "$desktop\uimagician.lnk" "$programfiles\uimagician\uimagician.exe"   file "fatbee_v2.ico"   file "qtxml4.dll"   file "qtgui4.dll"   file "qtcore4.dll"   file "mingwm10.dll"   file "libgcc_s_dw2-1.dll"   file "helpcontent.xml"   file "readme.txt"   file "history.txt"   file /a /r "intel_xdx\" sectionend  section -additionalicons   setoutpath $instdir   writeinistr "$instdir\${product_name}.url" "internetshortcut" "url" "${product_web_site}"   createshortcut "$smprograms\uimagician\website.lnk" "$instdir\${product_name}.url"   createshortcut "$smprograms\uimagician\uninstall.lnk" "$instdir\uninst.exe" sectionend  section -post   writeuninstaller "$instdir\uninst.exe"   writeregstr hklm "${product_dir_regkey}" "" "$programfiles\uimagician\uimagician.exe"   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" "$programfiles\uimagician.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}" sectionend   function un.onuninstsuccess   hidewindow   messagebox mb_iconinformation|mb_ok "$(^name) removed computer." functionend  function un.oninit   messagebox mb_iconquestion|mb_yesno|mb_defbutton2 "are sure want remove $(^name) , of components?" idyes +2   abort functionend  section uninstall   delete "$instdir\${product_name}.url"   delete "$instdir\uninst.exe"   delete "$programfiles\uimagician\readme.txt"   delete "$programfiles\uimagician\helpcontent.xml"   delete "$programfiles\uimagician\libgcc_s_dw2-1.dll"   delete "$programfiles\uimagician\mingwm10.dll"   delete "$programfiles\uimagician\qtcore4.dll"   delete "$programfiles\uimagician\qtgui4.dll"   delete "$programfiles\uimagician\qtxml4.dll"   delete "$programfiles\uimagician\sample.ico"   delete "$programfiles\uimagician\uimagician.exe"   delete "$programfiles\uimagician\uimagicianlicence.txt"   delete "$programfiles\uimagician\fatbee_v2.ico"   delete "$programfiles\uimagician\history.txt"    rmdir /r "$programfiles\intel_xdx\"    delete "$smprograms\uimagician\uninstall.lnk"   delete "$smprograms\uimagician\website.lnk"   delete "$desktop\uimagician.lnk"   delete "$smprograms\uimagician\uimagician.lnk"    rmdir "$smprograms\uimagician"    deleteregkey ${product_uninst_root_key} "${product_uninst_key}"   deleteregkey hklm "${product_dir_regkey}"   setautoclose true sectionend 

you're installing intel_xdx $programfiles\uimagician\intel_xdx you're trying delete $programfiles\intel_xdx\.

why don't delete program's folder:

rmdir /r "$smprograms\uimagician" 

or better:

  rmdir /r "$instdir" 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -