-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/monstermac77/vr into main
- Loading branch information
Showing
7 changed files
with
153 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo off | ||
|
||
:: NOTE: If you want to launch MixedVR-Manager manually in a terminal window, please run "mixedvr-manager.bat" as admin | ||
:: this file should only be run by the scheduled task in elevated permissions | ||
:: Another note: have confirmed that we still need to launch through vbs to make the program run headlessly | ||
|
||
:: file path for MixedVR-Manager from argument passed in by scheduled task | ||
:: using %* to collate all arguments to catch where filepath has spaces (and therefore passed as multiple parameters) | ||
set FilePath=%* | ||
|
||
:: call vbs script and pass file path as argument | ||
"%FilePath%\bin\mixedvr-manager-startup.vbs" "%FilePath%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'Thank you: https://superuser.com/a/140077/699131 | ||
'This is how you can determine what process this is in task manager: https://superuser.com/a/362167/699131 | ||
|
||
Dim FilePath | ||
|
||
'Check if active filepath is provided as argument, otherwise default to current working directory | ||
If WScript.Arguments.Count > 0 Then | ||
FilePath = WScript.Arguments(0) & "" | ||
Else | ||
FilePath = "" | ||
End if | ||
|
||
'Call runtime bat via absolute path - again admin rights appears to cause issues with relative paths | ||
'with VBS it seems to run from C:\Windows\System32\ | ||
'additional escaped quotes to allow for filepaths with spaces | ||
Set oShell = CreateObject ("Wscript.Shell") | ||
Dim strArgs | ||
strArgs = "cmd /c """ & FilePath & "\bin\mixedvr-manager.bat""" | ||
oShell.Run strArgs, 0, false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@echo off | ||
|
||
:: NOTE: If you want to launch MixedVR-Manager manually in a terminal window, please run "mixedvr-manager.bat" as admin | ||
|
||
:: NOTE: This installer must be run as administrator (ty: https://stackoverflow.com/a/11995662/2611730) | ||
echo Administrative permissions required. Detecting permissions... | ||
net session >nul 2>&1 | ||
if %errorLevel% == 0 ( | ||
echo Success: Administrative permissions confirmed. Proceeding with install... | ||
) else ( | ||
echo Failure: Current permissions inadequate. Please right click on file and select "Run as Administrator" | ||
timeout 10 >NUL | ||
exit | ||
) | ||
|
||
:: find location of Mixed VR Manager | ||
set MixedVRManagerFolder=%~dp0 | ||
|
||
:: remove trailing slash from folder path to avoid escape issues with argument | ||
set MixedVRManagerFolder=%MixedVRManagerFolder:~0,-1% | ||
|
||
:: create scheduled task | ||
:: /SC ONLOGON - run on user logon | ||
:: /RL HIGHEST - run as administrator | ||
SCHTASKS /CREATE /SC ONLOGON /TN "VR\Mixed VR Manager" /RL HIGHEST /TR "'%MixedVRManagerFolder%\bin\mixedvr-manager-startup-wrapper.bat' %MixedVRManagerFolder%" | ||
|
||
:: run the scheduled task (this just makes it so they don't have to reboot) | ||
SCHTASKS /RUN /TN "VR\Mixed VR Manager" | ||
|
||
echo ******************************************************************* | ||
echo *****PLEASE READ***********PLEASE READ**********PLEASE READ******** | ||
echo ******************************************************************* | ||
echo MixedVR Manager has been installed and is now running. | ||
echo Please turn on an Index Controller (or start SteamVR directly), count to 30, and then put on your headset. | ||
echo After launching SteamVR you don't have to touch the mouse/keyboard/controller; MixedVR Manager handles all setup. | ||
echo (Note: you will see SteamVR exit and then restart several seconds later. This is normal. It's not crashing). | ||
echo When you're done, open the SteamVR dashboard and select 'Exit VR'. MixedVR Manager will shut down everything automatically. | ||
echo ******************************************************************* | ||
echo *****PLEASE READ***********PLEASE READ**********PLEASE READ******** | ||
echo ******************************************************************* | ||
timeout 60 >NUL |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@echo off | ||
|
||
:: NOTE: This installer must be run as administrator (ty: https://stackoverflow.com/a/11995662/2611730) | ||
echo Administrative permissions required. Detecting permissions... | ||
net session >nul 2>&1 | ||
if %errorLevel% == 0 ( | ||
echo Success: Administrative permissions confirmed. Proceeding with uninstall... | ||
) else ( | ||
echo Failure: Current permissions inadequate. Please right click on file and select "Run as Administrator" | ||
timeout 10 >NUL | ||
exit | ||
) | ||
|
||
:: find location of Mixed VR Manager | ||
set MixedVRManagerFolder=%~dp0 | ||
|
||
:: kill mixedvr-manager if currently running | ||
taskkill /f /t /fi "Windowtitle eq Administrator: MixedVR Manager" | ||
taskkill /f /t /fi "Windowtitle eq MixedVR Manager" | ||
|
||
:: delete scheduled task | ||
schtasks /Delete /TN "VR\Mixed VR Manager" /F | ||
|
||
:: undo any processes here that people would expect to be undone, like re-enable the HMD | ||
echo MixedVR-Manager is changing state of USB device, the HMD, to /enable just in case it was off... | ||
"%MixedVRManagerFolder%bin\USBDeview.exe" /RunAsAdmin /enable "HoloLens Sensors" | ||
|
||
echo ******************************************************************* | ||
echo *****PLEASE READ***********PLEASE READ**********PLEASE READ******** | ||
echo ******************************************************************* | ||
echo MixedVR-Manager uninstalled. | ||
echo If MixedVR manager wasn't working correctly for you, try the following: | ||
echo * Double clicking on mixedvr-manager.bat inside the bin/ folder | ||
echo * Opening SteamVR | ||
echo * Send a screenshot of the output to /u/monstermac77 on Reddit, or post it on the Github | ||
echo ******************************************************************* | ||
echo *****PLEASE READ***********PLEASE READ**********PLEASE READ******** | ||
echo ******************************************************************* | ||
|
||
timeout 60 >NUL | ||
|