Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 1f5a9a0

Browse files
committed
customizations
1 parent 08c5cd4 commit 1f5a9a0

4 files changed

Lines changed: 19 additions & 10 deletions

File tree

Loader.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
cls
1+
param (
2+
[switch]$DontPromptPasswordUpdateGPU
3+
)
4+
5+
cls
26
Write-Host -foregroundcolor red "
37
((//////
48
#######//////
@@ -68,6 +72,12 @@ Start-Sleep -s 1
6872
Write-Output "Unblocking files just in case"
6973
Get-ChildItem -Path $path\ParsecTemp -Recurse | Unblock-File
7074
Write-Output "Starting main script"
71-
start-process powershell.exe -verb RunAS -argument "-file $path\parsectemp\PostInstall\PostInstall.ps1"
75+
76+
if($DontPromptPasswordUpdateGPU){
77+
start-process powershell.exe -verb RunAS -argument "-file $path\parsectemp\PostInstall\PostInstall.ps1 -DontPromptPasswordUpdateGPU"
78+
} else {
79+
start-process powershell.exe -verb RunAS -argument "-file $path\parsectemp\PostInstall\PostInstall.ps1"
80+
}
81+
7282
Write-Host "You can close this window now...progress will happen on the Powershell Window that just opened" -backgroundcolor red
7383
stop-process -Id $PID

PostInstall/PostInstall.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function setupEnvironment {
3636
if((Test-Path $env:ProgramData\ParsecLoader\Parsec.png) -eq $true) {} Else {Move-Item -Path $path\ParsecTemp\PreInstall\Parsec.png -Destination $env:ProgramData\ParsecLoader}
3737
if((Test-Path $env:ProgramData\ParsecLoader\ShowDialog.ps1) -eq $true) {} Else {Move-Item -Path $path\ParsecTemp\PreInstall\ShowDialog.ps1 -Destination $env:ProgramData\ParsecLoader}
3838
if((Test-Path $env:ProgramData\ParsecLoader\OneHour.ps1) -eq $true) {} Else {Move-Item -Path $path\ParsecTemp\PreInstall\OneHour.ps1 -Destination $env:ProgramData\ParsecLoader}
39-
if((Test-Path $env:ProgramData\ParsecLoader\TeamMachineSetup.ps1) -eq $true) {} Else {Move-Item -Path $path\ParsecTemp\PreInstall\TeamMachineSetup.ps1 -Destination $env:ProgramData\ParsecLoader}
39+
# if((Test-Path $env:ProgramData\ParsecLoader\TeamMachineSetup.ps1) -eq $true) {} Else {Move-Item -Path $path\ParsecTemp\PreInstall\TeamMachineSetup.ps1 -Destination $env:ProgramData\ParsecLoader}
4040
if((Test-Path $env:ProgramData\ParsecLoader\parsecpublic.cer) -eq $true) {} Else {Move-Item -Path $path\ParsecTemp\PreInstall\parsecpublic.cer -Destination $env:ProgramData\ParsecLoader}
4141
}
4242

@@ -60,7 +60,7 @@ function cloudprovider {
6060

6161
$paperspace = $(
6262
Try {
63-
(Invoke-WebRequest -uri http://metadata.paperspace.com/meta-data/machine -TimeoutSec 5)
63+
(Invoke-WebRequest -uri http://169.254.169.254/meta-data/machine -TimeoutSec 5)
6464
}
6565
catch {
6666
}
@@ -955,7 +955,7 @@ $ScripttaskList = @(
955955
"clean-up";
956956
"clean-up-recent";
957957
"provider-specific";
958-
"TeamMachineSetupScheduledTask"
958+
#"TeamMachineSetupScheduledTask"
959959
)
960960

961961
foreach ($func in $ScripttaskList) {

PreInstall/TeamMachineSetup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function fetchUserData {
3636
catch {
3737
}
3838
Try {
39-
(Invoke-WebRequest -uri http://metadata.paperspace.com/meta-data/machine -TimeoutSec 5)
39+
(Invoke-WebRequest -uri http://169.254.169.254/meta-data/machine -TimeoutSec 5)
4040
$stream = "bytes"
4141
}
4242
catch {

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Do not select "Turn on Display Device" when setting up the instance, this will c
4545
### START HERE! Copy this code into Powershell (you may need to press enter at the end):
4646
```
4747
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
48-
$ScriptWebArchive = "https://github.com/parsec-cloud/Parsec-Cloud-Preparation-Tool/archive/master.zip"
48+
$ScriptWebArchive = "https://github.com/kaktus42/Parsec-Cloud-Preparation-Tool/archive/master.zip"
4949
$LocalArchivePath = "$ENV:UserProfile\Downloads\Parsec-Cloud-Preparation-Tool"
5050
(New-Object System.Net.WebClient).DownloadFile($ScriptWebArchive, "$LocalArchivePath.zip")
5151
Expand-Archive "$LocalArchivePath.zip" -DestinationPath $LocalArchivePath -Force
@@ -123,11 +123,10 @@ Q. I want to run this script automatically without user interraction.
123123
A. It's possible to do so but you will need to figure out how to install the GPU Driver on your own. The below code will do everything but install the GPU Driver.
124124
```
125125
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
126-
$ScriptWebArchive = "https://github.com/parsec-cloud/Parsec-Cloud-Preparation-Tool/archive/master.zip"
126+
$ScriptWebArchive = "https://github.com/kaktus42/Parsec-Cloud-Preparation-Tool/archive/master.zip"
127127
$LocalArchivePath = "$ENV:UserProfile\Downloads\Parsec-Cloud-Preparation-Tool"
128128
(New-Object System.Net.WebClient).DownloadFile($ScriptWebArchive, "$LocalArchivePath.zip")
129129
Expand-Archive "$LocalArchivePath.zip" -DestinationPath $LocalArchivePath -Force
130-
CD $LocalArchivePath\Parsec-Cloud-Preparation-Tool-master\PostInstall
131-
powershell.exe .\PostInstall.ps1 -DontPromptPasswordUpdateGPU
130+
CD $LocalArchivePath\Parsec-Cloud-Preparation-Tool-master\ | powershell.exe .\Loader.ps1 -DontPromptPasswordUpdateGPU
132131
```
133132

0 commit comments

Comments
 (0)