Skip to content

Commit 46708ff

Browse files
committed
Fix installer issues
1 parent b47be38 commit 46708ff

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

app/Project Tracker Installer/Project Tracker Installer/MainWindow.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ void startup() {
8181

8282
// Copies the current file to the Program Data folder. Code execution doesn't pass this if it's not already there
8383
if ((Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\Project Tracker Installer.exe") != INSTALLER_PATH) {
84-
string currentLocation = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\Project Tracker Installer.exe";
84+
Process process = Process.GetCurrentProcess();
85+
string currentLocation = process.MainModule.FileName;
8586

8687
if (!File.Exists(INSTALLER_PATH)) { // An installer file exists
8788
try {
@@ -91,6 +92,7 @@ void startup() {
9192

9293
// Copy this program over to the new location
9394
File.Copy(currentLocation, INSTALLER_PATH);
95+
9496
File.SetAttributes(INSTALLER_PATH, FileAttributes.Normal);
9597
}
9698
catch (UnauthorizedAccessException) { // For some reason we can't take the file hmmf
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)