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

View File

@@ -122,6 +122,20 @@ function CreateURLShortcut {
$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 {
param (
[string] $Type
@@ -152,12 +166,8 @@ function InstallApps {
InstallZip -zip "EduPython.zip" -exe "EduPython.exe" -app "EduPython" -skipIf "C:\Program Files\EduPython"
InstallZip -zip "rastop.zip" -exe "RasTop.exe" -app "RasTop"
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"
$shell = New-Object -ComObject WScript.Shell
$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()
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`""
InstallMsi -app "AtelierScientifiqueElevePhy_FR_8_1_7.msi"
}
"Info" {
InstallMsi -app "EV3_Classroom_Windows_1.5.3_Global.msi"