Gitlab to Gitea Migration
This commit is contained in:
212
User/Install.ps1
Normal file
212
User/Install.ps1
Normal file
@@ -0,0 +1,212 @@
|
||||
param(
|
||||
$team_id,
|
||||
$key
|
||||
)
|
||||
|
||||
while(!(Test-NetConnection Google.com).PingSucceeded){
|
||||
Start-Sleep -Seconds 1
|
||||
}
|
||||
|
||||
Get-ChildItem -Path C:\ProgramData\Easy-GPU-P -Recurse | Unblock-File
|
||||
|
||||
if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Parsec)
|
||||
{}
|
||||
else {
|
||||
(New-Object System.Net.WebClient).DownloadFile("https://builds.parsecgaming.com/package/parsec-windows.exe", "C:\Users\$env:USERNAME\Downloads\parsec-windows.exe")
|
||||
Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-windows.exe" -ArgumentList "/silent", "/shared","/team_id=$team_id","/team_computer_key=$key" -wait
|
||||
While (!(Test-Path C:\ProgramData\Parsec\config.txt)){
|
||||
Start-Sleep -s 1
|
||||
}
|
||||
$configfile = Get-Content C:\ProgramData\Parsec\config.txt
|
||||
$configfile += "host_virtual_monitors = 1"
|
||||
$configfile += "host_privacy_mode = 1"
|
||||
$configfile | Out-File C:\ProgramData\Parsec\config.txt -Encoding ascii
|
||||
Copy-Item -Path "C:\ProgramData\Easy-GPU-P\Parsec.lnk" -Destination "C:\Users\Public\Desktop"
|
||||
Stop-Process parsecd -Force
|
||||
}
|
||||
|
||||
Function ParsecVDDMonitorSetupScheduledTask {
|
||||
$XML = @"
|
||||
<?xml version="1.0" encoding="UTF-16"?>
|
||||
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
|
||||
<RegistrationInfo>
|
||||
<Description>Monitors the state of Parsec Virtual Display and repairs if broken</Description>
|
||||
<URI>\Monitor Parsec VDD State</URI>
|
||||
</RegistrationInfo>
|
||||
<Triggers>
|
||||
<LogonTrigger>
|
||||
<Enabled>true</Enabled>
|
||||
<UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).Name)</UserId>
|
||||
<Delay>PT2M</Delay>
|
||||
</LogonTrigger>
|
||||
</Triggers>
|
||||
<Principals>
|
||||
<Principal id="Author">
|
||||
<UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).User.Value)</UserId>
|
||||
<LogonType>S4U</LogonType>
|
||||
<RunLevel>HighestAvailable</RunLevel>
|
||||
</Principal>
|
||||
</Principals>
|
||||
<Settings>
|
||||
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
|
||||
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
|
||||
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
|
||||
<AllowHardTerminate>true</AllowHardTerminate>
|
||||
<StartWhenAvailable>false</StartWhenAvailable>
|
||||
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
|
||||
<IdleSettings>
|
||||
<StopOnIdleEnd>true</StopOnIdleEnd>
|
||||
<RestartOnIdle>false</RestartOnIdle>
|
||||
</IdleSettings>
|
||||
<AllowStartOnDemand>true</AllowStartOnDemand>
|
||||
<Enabled>true</Enabled>
|
||||
<Hidden>false</Hidden>
|
||||
<RunOnlyIfIdle>false</RunOnlyIfIdle>
|
||||
<WakeToRun>false</WakeToRun>
|
||||
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
|
||||
<Priority>7</Priority>
|
||||
</Settings>
|
||||
<Actions Context="Author">
|
||||
<Exec>
|
||||
<Command>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe</Command>
|
||||
<Arguments>-file %programdata%\Easy-GPU-P\VDDMonitor.ps1</Arguments>
|
||||
</Exec>
|
||||
</Actions>
|
||||
</Task>
|
||||
"@
|
||||
|
||||
try {
|
||||
Get-ScheduledTask -TaskName "Monitor Parsec VDD State" -ErrorAction Stop | Out-Null
|
||||
Unregister-ScheduledTask -TaskName "Monitor Parsec VDD State" -Confirm:$false
|
||||
}
|
||||
catch {}
|
||||
$action = New-ScheduledTaskAction -Execute 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe' -Argument '-file %programdata%\Easy-GPU-P\VDDMonitor.ps1'
|
||||
$trigger = New-ScheduledTaskTrigger -AtStartup
|
||||
Register-ScheduledTask -XML $XML -TaskName "Monitor Parsec VDD State" | Out-Null
|
||||
}
|
||||
Function VBCableInstallSetupScheduledTask {
|
||||
$XML = @"
|
||||
<?xml version="1.0" encoding="UTF-16"?>
|
||||
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
|
||||
<RegistrationInfo>
|
||||
<Description>Install VB Cable</Description>
|
||||
<URI>\Install VB Cable</URI>
|
||||
</RegistrationInfo>
|
||||
<Triggers>
|
||||
<LogonTrigger>
|
||||
<Enabled>true</Enabled>
|
||||
<UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).Name)</UserId>
|
||||
<Delay>PT2M</Delay>
|
||||
</LogonTrigger>
|
||||
</Triggers>
|
||||
<Principals>
|
||||
<Principal id="Author">
|
||||
<UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).User.Value)</UserId>
|
||||
<LogonType>S4U</LogonType>
|
||||
<RunLevel>HighestAvailable</RunLevel>
|
||||
</Principal>
|
||||
</Principals>
|
||||
<Settings>
|
||||
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
|
||||
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
|
||||
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
|
||||
<AllowHardTerminate>true</AllowHardTerminate>
|
||||
<StartWhenAvailable>false</StartWhenAvailable>
|
||||
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
|
||||
<IdleSettings>
|
||||
<StopOnIdleEnd>true</StopOnIdleEnd>
|
||||
<RestartOnIdle>false</RestartOnIdle>
|
||||
</IdleSettings>
|
||||
<AllowStartOnDemand>true</AllowStartOnDemand>
|
||||
<Enabled>true</Enabled>
|
||||
<Hidden>false</Hidden>
|
||||
<RunOnlyIfIdle>false</RunOnlyIfIdle>
|
||||
<WakeToRun>false</WakeToRun>
|
||||
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
|
||||
<Priority>7</Priority>
|
||||
</Settings>
|
||||
<Actions Context="Author">
|
||||
<Exec>
|
||||
<Command>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe</Command>
|
||||
<Arguments>-file %programdata%\Easy-GPU-P\VBCableInstall.ps1</Arguments>
|
||||
</Exec>
|
||||
</Actions>
|
||||
</Task>
|
||||
"@
|
||||
|
||||
try {
|
||||
Get-ScheduledTask -TaskName "Install VB Cable" -ErrorAction Stop | Out-Null
|
||||
Unregister-ScheduledTask -TaskName "Install VB Cable" -Confirm:$false
|
||||
}
|
||||
catch {}
|
||||
$action = New-ScheduledTaskAction -Execute 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe' -Argument '-file %programdata%\Easy-GPU-P\VBCableInstall.ps1'
|
||||
$trigger = New-ScheduledTaskTrigger -AtStartup
|
||||
Register-ScheduledTask -XML $XML -TaskName "Install VB Cable" | Out-Null
|
||||
}
|
||||
Function ParsecVDDInstallSetupScheduledTask {
|
||||
$XML = @"
|
||||
<?xml version="1.0" encoding="UTF-16"?>
|
||||
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
|
||||
<RegistrationInfo>
|
||||
<Description>Install Parsec Virtual Display Driver</Description>
|
||||
<URI>\Install Parsec Virtual Display Driver</URI>
|
||||
</RegistrationInfo>
|
||||
<Triggers>
|
||||
<LogonTrigger>
|
||||
<Enabled>true</Enabled>
|
||||
<UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).Name)</UserId>
|
||||
<Delay>PT2M</Delay>
|
||||
</LogonTrigger>
|
||||
</Triggers>
|
||||
<Principals>
|
||||
<Principal id="Author">
|
||||
<UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).User.Value)</UserId>
|
||||
<LogonType>S4U</LogonType>
|
||||
<RunLevel>HighestAvailable</RunLevel>
|
||||
</Principal>
|
||||
</Principals>
|
||||
<Settings>
|
||||
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
|
||||
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
|
||||
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
|
||||
<AllowHardTerminate>true</AllowHardTerminate>
|
||||
<StartWhenAvailable>false</StartWhenAvailable>
|
||||
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
|
||||
<IdleSettings>
|
||||
<StopOnIdleEnd>true</StopOnIdleEnd>
|
||||
<RestartOnIdle>false</RestartOnIdle>
|
||||
</IdleSettings>
|
||||
<AllowStartOnDemand>true</AllowStartOnDemand>
|
||||
<Enabled>true</Enabled>
|
||||
<Hidden>false</Hidden>
|
||||
<RunOnlyIfIdle>false</RunOnlyIfIdle>
|
||||
<WakeToRun>false</WakeToRun>
|
||||
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
|
||||
<Priority>7</Priority>
|
||||
</Settings>
|
||||
<Actions Context="Author">
|
||||
<Exec>
|
||||
<Command>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe</Command>
|
||||
<Arguments>-file %programdata%\Easy-GPU-P\ParsecVDDInstall.ps1</Arguments>
|
||||
</Exec>
|
||||
</Actions>
|
||||
</Task>
|
||||
"@
|
||||
|
||||
try {
|
||||
Get-ScheduledTask -TaskName "Install Parsec Virtual Display Driver" -ErrorAction Stop | Out-Null
|
||||
Unregister-ScheduledTask -TaskName "Install Parsec Virtual Display Driver" -Confirm:$false
|
||||
}
|
||||
catch {}
|
||||
$action = New-ScheduledTaskAction -Execute 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe' -Argument '-file %programdata%\Easy-GPU-P\ParsecVDDInstall.ps1'
|
||||
$trigger = New-ScheduledTaskTrigger -AtStartup
|
||||
Register-ScheduledTask -XML $XML -TaskName "Install Parsec Virtual Display Driver" | Out-Null
|
||||
}
|
||||
|
||||
ParsecVDDMonitorSetupScheduledTask
|
||||
VBCableInstallSetupScheduledTask
|
||||
ParsecVDDInstallSetupScheduledTask
|
||||
|
||||
Start-ScheduledTask -TaskName "Install VB Cable"
|
||||
Start-ScheduledTask -TaskName "Install Parsec Virtual Display Driver"
|
||||
Start-ScheduledTask -TaskName "Monitor Parsec VDD State"
|
||||
4
User/psscripts.ini
Normal file
4
User/psscripts.ini
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
[Logon]
|
||||
0CmdLine=Install.ps1
|
||||
0Parameters=
|
||||
Reference in New Issue
Block a user