From 4fda6d9caa26f8ff0d7dc1bef9cf9ab6ad0abe6c Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Tue, 10 Oct 2023 14:23:35 +0000 Subject: [PATCH] Update setupScriptInfo.ps1 --- setupScriptInfo.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setupScriptInfo.ps1 b/setupScriptInfo.ps1 index 15ab736..707c394 100644 --- a/setupScriptInfo.ps1 +++ b/setupScriptInfo.ps1 @@ -147,9 +147,9 @@ choco install audacity -y choco install scratch -y choco install mblock -y -Expand-Archive -Path "C:\tmp\Simulation Domotique.zip" -DestinationPath "C:\Program Files\" -Force +Expand-Archive -Path (Join-Path $tmpPath "Simulation Domotique.zip") -DestinationPath $env:ProgramFiles -Force $targetExePath = "C:\Program Files\Simulation Domotique\simulation.exe" -$shortcutPath = "C:\Users\Public\Desktop\Simulation Domotique.lnk" +$shortcutPath = (Join-Path $env:PUBLIC "Desktop\Simulation Domotique.lnk") $shell = New-Object -ComObject WScript.Shell $shortcut = $shell.CreateShortcut($shortcutPath) $shortcut.TargetPath = $targetExePath @@ -158,10 +158,10 @@ $shortcut.WorkingDirectory = (Get-Item $targetExePath).DirectoryName $shortcut.Save() choco install arduino -y choco install ganttproject -y -Start-Process -FilePath "msiexec.exe" -ArgumentList "/i C:\tmp\EV3_Classroom_Windows_1.5.3_Global.msi /qn" -Wait -Expand-Archive -Path "C:\tmp\RobotProg.zip" -DestinationPath "C:\Program Files\" -Force +Start-Process -FilePath "msiexec.exe" -ArgumentList "/i (Join-Path $tmpPath EV3_Classroom_Windows_1.5.3_Global.msi) /qn" -Wait +Expand-Archive -Path (Join-Path $tmpPath RobotProg.zip) -DestinationPath $env:ProgramFiles -Force $targetExePath = "C:\Program Files\RobotProg\RobotProg.exe" -$shortcutPath = "C:\Users\Public\Desktop\RobotProg.lnk" +$shortcutPath = (Join-Path $env:PUBLIC "Desktop\RobotProg.lnk") $shell = New-Object -ComObject WScript.Shell $shortcut = $shell.CreateShortcut($shortcutPath) $shortcut.TargetPath = $targetExePath