Added Jeulin and EditShortcut

This commit is contained in:
2024-07-01 11:04:08 +02:00
parent bbb2e2276b
commit f8c4e0ef1c
3 changed files with 22 additions and 8 deletions

Binary file not shown.

View File

@@ -122,6 +122,20 @@ function CreateURLShortcut {
$urlShortcut.Save() $urlShortcut.Save()
} }
function EditShortcut {
param (
[string] $ShortcutPath,
[string] $TargetPath,
[string] $Arguments
)
$wshShell = New-Object -ComObject "WScript.Shell"
$shortcut = $wshShell.CreateShortcut($ShortcutPath)
$shortcut.TargetPath = $TargetPath
$shortcut.Arguments = $Arguments
$shortcut.Save()
}
function InstallApps { function InstallApps {
param ( param (
[string] $Type [string] $Type
@@ -152,12 +166,8 @@ function InstallApps {
InstallZip -zip "EduPython.zip" -exe "EduPython.exe" -app "EduPython" -skipIf "C:\Program Files\EduPython" InstallZip -zip "EduPython.zip" -exe "EduPython.exe" -app "EduPython" -skipIf "C:\Program Files\EduPython"
InstallZip -zip "rastop.zip" -exe "RasTop.exe" -app "RasTop" InstallZip -zip "rastop.zip" -exe "RasTop.exe" -app "RasTop"
InstallExeSetup -app "SalsaJ_2_3.exe" -skipIf "C:\Program Files (x86)\SalsaJ" InstallExeSetup -app "SalsaJ_2_3.exe" -skipIf "C:\Program Files (x86)\SalsaJ"
# edit C:\Users\Public\Desktop\SalsaJ.lnk target to "C:\Program Files (x86)\Java\jre1.8\bin\javaw.exe" -jar -Dfile.encoding=UTF-8 "C:\Program Files (x86)\SalsaJ\SalsaJ.jar" EditShortcut -ShortcutPath $(Join-Path $env:PUBLIC "Desktop\SalsaJ.lnk") -TargetPath "C:\Program Files (x86)\Java\jre-1.8\bin\javaw.exe" -Arguments "-jar -Dfile.encoding=UTF-8 `"$env:ProgramFiles (x86)\SalsaJ\SalsaJ.jar`""
$shell = New-Object -ComObject WScript.Shell InstallMsi -app "AtelierScientifiqueElevePhy_FR_8_1_7.msi"
$shortcut = $shell.CreateShortcut($(Join-Path $env:PUBLIC "Desktop\SalsaJ.lnk"))
$shortcut.TargetPath = "C:\Program Files (x86)\Java\jre-1.8\bin\javaw.exe"
$shortcut.Arguments = "-jar -Dfile.encoding=UTF-8 `"$env:ProgramFiles (x86)\SalsaJ\SalsaJ.jar`""
$shortcut.Save()
} }
"Info" { "Info" {
InstallMsi -app "EV3_Classroom_Windows_1.5.3_Global.msi" InstallMsi -app "EV3_Classroom_Windows_1.5.3_Global.msi"

View File

@@ -89,12 +89,16 @@ function DownloadFiles {
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/rastop.zip" Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/rastop.zip"
FileName = "rastop.zip" FileName = "rastop.zip"
Hash = "ae63a6aaf8c85adc16a93c7e2ebbab89b4796384" Hash = "ae63a6aaf8c85adc16a93c7e2ebbab89b4796384"
} },
,
@{ @{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/SalsaJ_2_3.exe" Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/SalsaJ_2_3.exe"
FileName = "SalsaJ_2_3.exe" FileName = "SalsaJ_2_3.exe"
Hash = "4998000aa25dbd6dee082839854efb4ab6ac9d56" Hash = "4998000aa25dbd6dee082839854efb4ab6ac9d56"
},
@{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/AtelierScientifiqueElevePhy_FR_8_1_7.msi"
FileName = "AtelierScientifiqueElevePhy_FR_8_1_7.msi"
Hash = "7c5a3f080a5bc862072e8eba78299dc409b85b2c"
} }
) )
} }