return value - how to terminate installer if unstallation of legacy version of software is cancelled before executing it? -
I've used innosetup to install an application on an installer (myinstaller) (myapp) code snippet: < / P>
function legacy_check (): boolean; ShellExec start ( 'runas', 'rundll32.exe', 'dfshim.dll, ShArpMaintain SecretsUtility.application, Culture = neutral, PublicKeyToken = -0000000000000000, processorArchitecture = amd64', '', SW_HIDE, ewWaitUntilTerminated, ERRORCODE); Results: = True; End; Start the function Setup (): Boolean; Start the result: = legacy_check (); // This code will only see // code to install the latest version end of the newly-setup wizard page; Checks legacy_check () here to check the existence of an older version of myapp in the system and uninstalls it and returns it right so Myinstaller can proceed. However, during the installation of the old version here, it asks the user whether to uninstall it or not, if the user is pressed properly to uninstall, then works fine. But if the user cancels the cancellation of the old version, then it should end myinstaller . But this does not end because it returns true to anyway. So I think I need to get some return code when the user cancels the button to cancel the press so that I can return true or false using the return code.
Then there is no way to get the returncode, press the user to uninstall, so that I can use it after the line cancellation,
ShellExec ( 'Runas' Rundll32kexe' Dfshimkdll, ShArpMaintain SecretsUtilitykapplication, Culture = neutral, Pblikkey token = 0000000000000000, Prosesrarchateccr = MD 64 '', Sdblu_haid, Iwvetanilttirmineted, Arrkod); ? Otherwise please let me know how to uninstall it silently. I am confused about how to use the / SILENT parameter in ShellExec because if the already existing parameters are present please suggest me some ideas
I changed my code to meet the requirement:
function legacy_check ( ): Boolean; ShellExec start ( 'runas', 'rundll32.exe', 'dfshim.dll, ShArpMaintain SecretsUtility.application, Culture = neutral, PublicKeyToken = -0000000000000000, processorArchitecture = amd64', '', SW_HIDE, ewWaitUntilTerminated, ERRORCODE); If RegKeyExists (HKEY_CURRENT_USER, 'Software \ Microsoft \ Windows \ CurrentVersion \ uninstall \ myapp') then results: = incorrect and the result: = true; End; Start the function Setup (): Boolean; Start the result: = legacy_check (); If there are no results then start the result: = wrong version // to install the end of the latest version;
Comments
Post a Comment