Skip to content

Commit 936c6fc

Browse files
author
Quang Mach
committed
- Add OneXConsole
- Change code structure abit to add more app easier
1 parent a6da47e commit 936c6fc

21 files changed

+202
-94
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
################################################################################
2+
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3+
################################################################################
4+
5+
/.vs
6+
/*.exe
7+
/*.zip

OneXConsole/Launcher.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@ECHO OFF
2+
::START "" "vlc.exe" --fullscreen --video-on-top --play-and-exit --no-video-title --loop -Idummy "%~dp0Videos\BootVideo.mp4"
3+
START "" "%~dp0..\mpv.exe" --script-opts=osc-visibility=never --ontop --no-terminal --loop --fullscreen "%~dp0Videos\BootVideo.mp4"
4+
5+
:: Wait for OneXConsole to start
6+
set "WindowTitle=OneXConsole"
7+
:loop
8+
timeout /t 5
9+
@for /f "Delims=:" %%a in ('tasklist /fi "WINDOWTITLE eq %WindowTitle%"') do @if %%a==INFO goto loop
10+
::taskkill /im vlc.exe
11+
taskkill /im mpv.exe
12+
EXIT
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Set WshShell = CreateObject("WScript.Shell")
2-
CurrentFolder = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
3-
WshShell.Run chr(34) & CurrentFolder&"\Steam.bat" & Chr(34), 0
1+
Set WshShell = CreateObject("WScript.Shell")
2+
CurrentFolder = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
3+
WshShell.Run chr(34) & CurrentFolder&"\Launcher.bat" & Chr(34), 0
44
Set WshShell = Nothing
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-16"?>
2+
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
3+
<Triggers>
4+
<LogonTrigger>
5+
<Enabled>true</Enabled>
6+
</LogonTrigger>
7+
</Triggers>
8+
<Principals>
9+
<Principal id="Author">
10+
<LogonType>InteractiveToken</LogonType>
11+
<RunLevel>HighestAvailable</RunLevel>
12+
</Principal>
13+
</Principals>
14+
<Settings>
15+
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
16+
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
17+
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
18+
<AllowHardTerminate>true</AllowHardTerminate>
19+
<StartWhenAvailable>false</StartWhenAvailable>
20+
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
21+
<IdleSettings>
22+
<StopOnIdleEnd>true</StopOnIdleEnd>
23+
<RestartOnIdle>false</RestartOnIdle>
24+
</IdleSettings>
25+
<AllowStartOnDemand>true</AllowStartOnDemand>
26+
<Enabled>true</Enabled>
27+
<Hidden>false</Hidden>
28+
<RunOnlyIfIdle>false</RunOnlyIfIdle>
29+
<WakeToRun>false</WakeToRun>
30+
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
31+
<Priority>3</Priority>
32+
</Settings>
33+
<Actions Context="Author">
34+
<Exec>
35+
<Command>wscript.exe</Command>
36+
<Arguments>WindowsExplorer.vbs</Arguments>
37+
</Exec>
38+
</Actions>
39+
</Task>

OneXConsole/Videos/BootVideo.mp4

2.58 MB
Binary file not shown.

OneXConsole/WindowsExplorer.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@echo off
2+
:: Restarting Explorer
3+
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "explorer.exe" /f
4+
timeout /T 1
5+
start explorer.exe
6+
timeout /T 1
7+
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "wscript.exe %~dp0LauncherStartup.vbs" /f
8+
9+
::OneXConsole have to start after explorer.exe to show up
10+
cmd.exe /c START "" "C:\Program Files\OneXConsole\OneXConsole.exe"
11+
12+
exit

OneXConsole/WindowsExplorer.vbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Set WshShell = CreateObject("WScript.Shell")
2+
CurrentFolder = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
3+
WshShell.Run chr(34) & CurrentFolder&"\WindowsExplorer.bat" & Chr(34), 0
4+
Set WshShell = Nothing

OneXConsole_Installer.bat

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@echo off
2+
3+
::Script to force run as Admin
4+
set "params=%*"
5+
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
6+
7+
setlocal enabledelayedexpansion
8+
set "inputfile=%~dp0OneXConsole\TaskScheduler_Template_DoNotTouch.xml"
9+
set "outputfile=%~dp0temp.xml"
10+
set "searchString=<Arguments>WindowsExplorer.vbs</Arguments>"
11+
set "replaceString=<Arguments>%~dp0OneXConsole\WindowsExplorer.vbs</Arguments>"
12+
13+
if exist "%outputfile%" del "%outputfile%"
14+
15+
for /f "delims=" %%i in ('type "%inputfile%"') do (
16+
set "line=%%i"
17+
set "modifiedLine=!line:%searchString%=%replaceString%!"
18+
echo !modifiedLine! >> "%outputfile%"
19+
)
20+
21+
:: Add Script to replace Playnite as shell
22+
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "wscript.exe %~dp0OneXConsole\LauncherStartup.vbs" /f
23+
24+
:: Add Task Scheduler to start explorer.exe
25+
schtasks /query /TN "Game Launcher Shell" >NUL 2>&1 && schtasks /delete /tn "Game Launcher Startup" /f & schtasks /create /tn "Game Launcher Shell" /xml %~dp0temp.xml
26+
27+
del "%outputfile%"
28+
29+
timeout /t 3
30+
exit
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
@ECHO OFF
2-
::START "" "vlc.exe" --fullscreen --video-on-top --play-and-exit --no-video-title --loop -Idummy "%~dp0Videos\BootVideo_Playnite.mp4"
3-
START "" "%~dp0..\mpv.exe" --script-opts=osc-visibility=never --ontop --no-terminal --loop --fullscreen "%~dp0..\Videos\BootVideo_Playnite.mp4"
4-
START "" "%LOCALAPPDATA%\Playnite\Playnite.FullscreenApp.exe" --hidesplashscreen
5-
:: Wait for Playnite to start
6-
set "WindowTitle=Playnite"
7-
:loop
8-
timeout /t 5
9-
@for /f "Delims=:" %%a in ('tasklist /fi "WINDOWTITLE eq %WindowTitle%"') do @if %%a==INFO goto loop
10-
::taskkill /im vlc.exe
11-
taskkill /im mpv.exe
1+
@ECHO OFF
2+
::START "" "vlc.exe" --fullscreen --video-on-top --play-and-exit --no-video-title --loop -Idummy "%~dp0Videos\BootVideo.mp4"
3+
START "" "%~dp0..\mpv.exe" --script-opts=osc-visibility=never --ontop --no-terminal --loop --fullscreen "%~dp0Videos\BootVideo.mp4"
4+
START "" "%LOCALAPPDATA%\Playnite\Playnite.FullscreenApp.exe" --hidesplashscreen
5+
:: Wait for Playnite to start
6+
set "WindowTitle=Playnite"
7+
:loop
8+
timeout /t 5
9+
@for /f "Delims=:" %%a in ('tasklist /fi "WINDOWTITLE eq %WindowTitle%"') do @if %%a==INFO goto loop
10+
::taskkill /im vlc.exe
11+
taskkill /im mpv.exe
1212
EXIT
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Set WshShell = CreateObject("WScript.Shell")
2-
CurrentFolder = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
3-
WshShell.Run chr(34) & CurrentFolder&"\Playnite.bat" & Chr(34), 0
1+
Set WshShell = CreateObject("WScript.Shell")
2+
CurrentFolder = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
3+
WshShell.Run chr(34) & CurrentFolder&"\Launcher.bat" & Chr(34), 0
44
Set WshShell = Nothing

0 commit comments

Comments
 (0)