Skip to content

Commit 522121f

Browse files
committed
Fix bugs in the installer
1 parent 8297ce5 commit 522121f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

TVR.Driver/drivers/Install.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
PowerShell -NoProfile -ExecutionPolicy Bypass -File .\Install.ps1

TVR.Driver/drivers/Uninstall.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
PowerShell -NoProfile -ExecutionPolicy Bypass -File .\Uninstall.ps1

TVR.Setup/Installer/Installer/MainWindow.xaml.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private async void BeginUninstallation()
7373
{
7474
StatusLabel.Content = "Removing...";
7575
var installFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "TwometerVR");
76-
var driverUninstallScript = Path.Combine(installFolder, "driver", "Uninstall.ps1");
76+
var driverUninstallScript = Path.Combine(installFolder, "driver", "Uninstall.bat");
7777
await Task.Run(() =>
7878
{
7979
var startInfo = new ProcessStartInfo
@@ -97,6 +97,7 @@ private async void BeginInstallation()
9797
try
9898
{
9999
var webClient = new WebClient();
100+
webClient.Headers.Add("User-Agent", "TwometerVR Installer/1.0");
100101
webClient.DownloadProgressChanged += (sender, e) =>
101102
{
102103
StatusBar.Value = e.ProgressPercentage;
@@ -129,7 +130,7 @@ await Task.Run(() =>
129130
StatusBar.IsIndeterminate = false;
130131
StatusBar.Value = 90;
131132

132-
var driverInstallScript = Path.Combine(installFolder, "driver", "Install.ps1");
133+
var driverInstallScript = Path.Combine(installFolder, "driver", "Install.bat");
133134

134135
await Task.Run(() =>
135136
{
@@ -162,6 +163,7 @@ await Task.Run(() =>
162163
}
163164
catch (Exception e)
164165
{
166+
Console.WriteLine(e.ToString());
165167
FailInstallation(e.Message);
166168
}
167169
}

0 commit comments

Comments
 (0)