Skip to content

Commit

Permalink
write Setup.exe path to app installation folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Galkon committed Jan 24, 2024
1 parent 51f5e2c commit 354fd8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Squirrel/UpdateManager.ApplyReleases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ await ReleasePackage.ExtractZipForInstall(
File.Delete(notFinishedFilePath);
}, "Couldn't delete file: " + notFinishedFilePath);

// Write the path of the current executable to setup.txt
this.ErrorIfThrows(() => {
var exePath = Assembly.GetEntryAssembly().Location;
var setupFilePath = Path.Combine(target.FullName, "setup.txt");
File.WriteAllText(setupFilePath, exePath);
}, "Couldn't write setup path to file");

return target.FullName;
});
}
Expand Down

0 comments on commit 354fd8c

Please sign in to comment.