EXE removal problem

I have an issue removing a EXE install.

Using the code here allows me to generate the uninstall command for the Exe.

Fixlett Code :-

appendfile {( value “UninstallString” of it) of keys whose (value “DisplayName” of it as string contains “SAP Secure Login”) of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x64 registries;x32 registries)} /Silent
delete c:\windows\temp\SAP-Secure-Login.bat
copy __appendfile c:\windows\temp\SAP-Secure-Login.bat
waithidden cmd.exe /c “c:\windows\temp\SAP-Secure-Login.bat”

Result :-

“C:\Program Files (x86)\SAP\SAPsetup\setup\NwSapSetup.exe” /Product=“SLC” /uninstall /Silent

Fixlett - Failed with Exit Code 3 (Unable to start Windows installer error “3 the system cannot find the path specified”)

Bes logs … __Global\Logs show :-

Command started - waithidden cmd.exe /c “c:\windows\temp\SAP-Secure-Login.bat” (action:127600)
Command succeeded (Exit Code=3) waithidden cmd.exe /c “c:\windows\temp\SAP-Secure-Login.bat” (action:127600)

If I add in the wow64 redirection :-

action uses wow64 redirection true
waithidden cmd.exe /c “c:\windows\temp\SAP-Secure-Login.bat”

But the same Failed with Exit Code 3 shown.

So have you tried running the Bat file manually?

Hello zanesand,

Yes, it works fine manually.
Looks that when executed via BF (cmd.exe /c) some parameters are missing, but they work when manually run.

I have this working now.

Changed from :-

action uses wow64 redirection true

To :-
action uses wow64 redirection {not x64 of operating system}
waithidden cmd.exe /c “c:\windows\temp\SAP-Secure-Login.bat” >> c:\windows\temp\SAP-Log.txt 2>&1

This is working. Also the extra logging confirm the running command line.