I am using InstallJammer for setup creation of my application. I want to check if the application is running before proceeding with uninstall procedure.
set program <%Company%><%AppName%>.exe
set pids [twapi::get_process_ids -name $program]
foreach pid $pids {
catch {twapi::end_process $pid -force}
}
Above given is the TCL script I tried. But the script does not return any values. How to solve this.?
I assume that you are using the execute script condition, while it might be easier to just use the script condition
If you use the script condition, just use the expr given by kostix:
[llength [twapi::get_process_ids -name <%Company%><%AppName%>.exe]] > 0
If you really have to use the execute script condition, then just wrap everyting in expr {
and }
and you get the same result as the script condition (Or: a script condition is just a execute script condition with expr {
at the beginning and }
at the end).
expr {[llength [twapi::get_process_ids -name <%Company%><%AppName%>.exe]] > 0}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With