Update setupScriptInfo.ps1
This commit is contained in:
@@ -148,6 +148,14 @@ choco install audacity -y
|
|||||||
choco install scratch -y
|
choco install scratch -y
|
||||||
choco install mblock -y
|
choco install mblock -y
|
||||||
Expand-Archive -Path (Join-Path $tmpPath "Simulation Domotique.zip") -DestinationPath $env:ProgramFiles -Force
|
Expand-Archive -Path (Join-Path $tmpPath "Simulation Domotique.zip") -DestinationPath $env:ProgramFiles -Force
|
||||||
|
$sourceFolderPath = Join-Path $env:ProgramFiles "simulation"
|
||||||
|
$destinationFolderPath = Join-Path $env:ProgramFiles "Simulation Domotique"
|
||||||
|
if (Test-Path -Path $sourceFolderPath -PathType Container) {
|
||||||
|
if (Test-Path -Path $destinationFolderPath -PathType Container) {
|
||||||
|
Remove-Item -Path $destinationFolderPath -Recurse -Force
|
||||||
|
}
|
||||||
|
Rename-Item -Path $sourceFolderPath -NewName "Simulation Domotique"
|
||||||
|
}
|
||||||
$targetExePath = "C:\Program Files\Simulation Domotique\simulation.exe"
|
$targetExePath = "C:\Program Files\Simulation Domotique\simulation.exe"
|
||||||
$shortcutPath = (Join-Path $env:PUBLIC "Desktop\Simulation Domotique.lnk")
|
$shortcutPath = (Join-Path $env:PUBLIC "Desktop\Simulation Domotique.lnk")
|
||||||
$shell = New-Object -ComObject WScript.Shell
|
$shell = New-Object -ComObject WScript.Shell
|
||||||
@@ -170,7 +178,7 @@ $shortcut.WorkingDirectory = (Get-Item $targetExePath).DirectoryName
|
|||||||
$shortcut.Save()
|
$shortcut.Save()
|
||||||
|
|
||||||
# URL shortcut
|
# URL shortcut
|
||||||
Disable-WindowsOptionalFeature -online -FeatureName internet-explorer-optional-amd64
|
Disable-WindowsOptionalFeature -online -NoRestart -FeatureName internet-explorer-optional-amd64
|
||||||
$wshShell = New-Object -ComObject "WScript.Shell"
|
$wshShell = New-Object -ComObject "WScript.Shell"
|
||||||
$urlShortcut = $wshShell.CreateShortcut((Join-Path $env:PUBLIC "Desktop\Office 365.url"))
|
$urlShortcut = $wshShell.CreateShortcut((Join-Path $env:PUBLIC "Desktop\Office 365.url"))
|
||||||
$urlShortcut.TargetPath = "https://office.com/"
|
$urlShortcut.TargetPath = "https://office.com/"
|
||||||
@@ -188,5 +196,5 @@ $urlShortcut.Save()
|
|||||||
|
|
||||||
# Update Windows
|
# Update Windows
|
||||||
Install-Module -Name PSWindowsUpdate -Force
|
Install-Module -Name PSWindowsUpdate -Force
|
||||||
Get-WindowsUpdate -Force
|
Get-WindowsUpdate -ForceInstall
|
||||||
Install-WindowsUpdate -AcceptAll -AutoReboot
|
Install-WindowsUpdate -AcceptAll -AutoReboot
|
||||||
|
|||||||
Reference in New Issue
Block a user