Skip to content

Commit

Permalink
Execute the .bat file directly on install to avoid the replacement of…
Browse files Browse the repository at this point in the history
… cmd (rustdesk#6817)

Signed-off-by: 21pages <[email protected]>
  • Loading branch information
21pages authored Jan 6, 2024
1 parent f4ef145 commit cdc31b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/platform/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1221,8 +1221,9 @@ fn run_cmds(cmds: String, show: bool, tip: &str) -> ResultType<()> {
let tmp = write_cmds(cmds, "bat", tip)?;
let tmp2 = get_undone_file(&tmp)?;
let tmp_fn = tmp.to_str().unwrap_or("");
let res = runas::Command::new("cmd")
.args(&["/C", &tmp_fn])
// https://github.com/rustdesk/rustdesk/issues/6786#issuecomment-1879655410
// Execute the .bat file directly to avoid the replacement of cmd
let res = runas::Command::new(&tmp_fn)
.show(show)
.force_prompt(true)
.status();
Expand Down

0 comments on commit cdc31b7

Please sign in to comment.