pub unsafe extern "system" fn RustupUninstall(hInstall: MSIHANDLE) -> UINT {
    let name = CString::new("RustupUninstall").unwrap();
    let hr = WcaInitialize(hInstall, name.as_ptr());
    // For deferred custom actions, all data must be passed through the `CustomActionData` property
    let custom_action_data = get_property("CustomActionData");
    let parsed_ca_data = parse_custom_action_data(&custom_action_data);
    let path = PathBuf::from(parsed_ca_data.get("INSTALLLOCATION").unwrap());
    let exe_deleted = !path.join("bin").join("rustup.exe").exists();
    log(&format!("Hello World from RustupUninstall, confirming that rustup.exe has been deleted: {}! CustomActionData: {}", exe_deleted, custom_action_data));
    log(&format!("Parsed CA data: {:?}", parsed_ca_data));
    ::rustup::utils::remove_dir("cargo_home", &path, &|_| {});
    // TODO: also remove RUSTUP_HOME
    //::rustup::utils::remove_dir("rustup_home", &rustup_home, &|_| {});
    WcaFinalize(hr)
}
/// This is be run as a `deferred` action after `RemoveFiles` on uninstall (not on upgrade!)
This is be run as a `deferred` action after `RemoveFiles` on uninstall (not on upgrade!)
This is be run as a ` deferred ` action after ` RemoveFiles ` on uninstall ( not on upgrade! )
pub unsafe extern "system" fn RustupUninstall(hInstall: MSIHANDLE) -> UINT {
    let name = CString::new("RustupUninstall").unwrap();
    let hr = WcaInitialize(hInstall, name.as_ptr());
    // For deferred custom actions, all data must be passed through the `CustomActionData` property
    let custom_action_data = get_property("CustomActionData");
    let parsed_ca_data = parse_custom_action_data(&custom_action_data);
    let path = PathBuf::from(parsed_ca_data.get("INSTALLLOCATION").unwrap());
    let exe_deleted = !path.join("bin").join("rustup.exe").exists();
    log(&format!("Hello World from RustupUninstall, confirming that rustup.exe has been deleted: {}! CustomActionData: {}", exe_deleted, custom_action_data));
    log(&format!("Parsed CA data: {:?}", parsed_ca_data));
    ::rustup::utils::remove_dir("cargo_home", &path, &|_| {});
    // TODO: also remove RUSTUP_HOME
    //::rustup::utils::remove_dir("rustup_home", &rustup_home, &|_| {});
    WcaFinalize(hr)
}
pub unsafe extern " " fn RustupUninstall ( hInstall : MSIHANDLE ) -> UINT { let name = CString :: new ( " " ) . unwrap ( ) ; let hr = WcaInitialize ( hInstall , name . as_ptr ( ) ) ; // For deferred custom actions, all data must be passed through the `CustomActionData` property let custom_action_data = get_property ( " " ) ; let parsed_ca_data = parse_custom_action_data ( & custom_action_data ) ; let path = PathBuf :: from ( parsed_ca_data . get ( " " ) . unwrap ( ) ) ; let exe_deleted = ! path . join ( " " ) . join ( " " ) . exists ( ) ; log ( & format ! ( " " exe_deleted custom_action_data ) ) ; log ( & format ! ( " " parsed_ca_data ) ) ; :: rustup :: utils :: remove_dir ( " " , & path , & | _ | { } ) ; // TODO: also remove RUSTUP_HOME //::rustup::utils::remove_dir("rustup_home", &rustup_home, &|_| {}); WcaFinalize ( hr ) }
This is be run as a `deferred` action after `RemoveFiles` on uninstall (not on upgrade!)
This is be run as a ` deferred ` action after ` RemoveFiles ` on uninstall ( not on upgrade! )
hInstall
MSIHANDLE
hInstall
MSIHANDLE