Skip to content

Commit

Permalink
🐛 fix msiexec log early read
Browse files Browse the repository at this point in the history
  • Loading branch information
H2Sxxa committed Jul 28, 2024
1 parent 9449f1c commit 54ea375
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/windows/msi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ enum DisplayMode {
qf,
}

Future<Process> msiexec(
Future<ProcessResult> msiexec(
String path, {
Iterable<String> arguments = const [],
String? logPath,
DisplayMode displayMode = DisplayMode.quiet,
RestartMode restartMode = RestartMode.norestart,
}) async {
return await Process.start(
return await Process.run(
"msiexec",
[
"/i",
Expand All @@ -37,7 +37,6 @@ Future<Process> msiexec(
...arguments,
...logPath != null ? ["/log", logPath] : []
],
mode: ProcessStartMode.detached,
);
}

Expand Down Expand Up @@ -73,17 +72,17 @@ void downloadMSIexec(
onDone();
}

await msiexec(
msiexec(
filePath,
arguments: arguments,
logPath: logPath,
displayMode: displayMode,
restartMode: restartMode,
);

if (afterInstall != null) {
afterInstall();
}
).then((_) {
if (afterInstall != null) {
afterInstall();
}
});
});
}

Expand Down

0 comments on commit 54ea375

Please sign in to comment.