Hey all, I’m trying to create an uninstaller for Notepad++ that handles both x86 & x64 installs but I’m running into some issues.
Current iteration:
if {exists key "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++" of x32 registries)}
wait (value "UninstallString" of key "Notepad++" of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registries) as string & " /S")
else
wait (value "UninstallString" of key "Notepad++" of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registries) as string & " /S")
endif
I believe my issue is the wait command and how I am passing values to this. So I have tried switching to a defined parameter instead:
if exists key "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++" of x32 registries)
parameter "uninstall_string" = (value "UninstallString" of key "Notepad++" of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registries) as string & " /S")
else
parameter "uninstall_string" = (value "UninstallString" of key "Notepad++" of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registries) as string & " /S")
endif
wait "{parameter "uninstall_string"}"
This also does not work. I feel like I am close but this is hard to troubleshoot using Q&A. Any suggestions?
EDIT: Examining my logs it looks like actually for the parameter it doesn’t like the concatenation. :\