Home
Printer
Misc
Adobe
Vinfen Links Shortcut
Reinstall O365
Cx360 Shortcut
Create Vinfen Links Shortcut
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Write-Host "Please run this script as an Administrator!" -ForegroundColor Red return } $sc = "Vinfen Links" $sc_target = "https://links.vinfen.org/" $sh = new-object -com "WScript.Shell" $p = "C:\users\Public\Desktop" $iconDirectory = "C:\Users\Public\Vinfen" if (!(Test-Path -Path $iconDirectory)) { New-Item -ItemType Directory -Path $iconDirectory -Force } $zipFilePath = $iconDirectory + "\Icon-VFLinks.zip" $iconURL = "https://vinfenmisc.blob.core.windows.net/central/VinfenLinksIcon.zip" Invoke-WebRequest -Uri $iconURL -OutFile $zipFilePath Expand-Archive -Path $zipFilePath -DestinationPath $iconDirectory -Force Remove-Item -Path $zipFilePath $lnk = $sh.CreateShortcut( (join-path $p $sc) + ".lnk") $lnk.TargetPath = $sc_target $lnk.IconLocation = "C:\Users\Public\Vinfen\VinfenLinksIcon\Icon-VFLinks.ico" $lnk.Save()