diff --git a/setupApps.ps1 b/setupApps.ps1 index 1b5ef8a..6387a7e 100644 --- a/setupApps.ps1 +++ b/setupApps.ps1 @@ -135,8 +135,10 @@ function InstallApps { InstallZip -zip "Sismolog.zip" -exe "Sismolog.exe" -app "Sismolog" InstallExe -app "Respipoisson.exe" InstallMsi -app "regressi-mpeg-setup.msi" - if (Test-Path 'C:\Users\Admin\AppData\Roaming\Microsoft\Start Menu\Programs\Regressi.ink') { + if (Test-Path 'C:\Users\Admin\AppData\Roaming\Microsoft\Start Menu\Programs\Regressi.ink' -and -not (Test-Path 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Regressi.lnk')) { Move-Item -Path 'C:\Users\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Regressi.lnk' -Destination 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\' -Force + } + if (Test-Path 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\' -and -not (Test-Path 'C:\Users\Public\Desktop\Regressi.lnk')) { Copy-Item -Path 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Regressi.lnk' -Destination 'C:\Users\Public\Desktop\' -Force } InstallZip -zip "regavi.zip" -exe "regavi.exe" -app "regavi"