wip addition create shortcut to URL
This commit is contained in:
parent
c9dd2af196
commit
d1457b312b
|
@ -0,0 +1,18 @@
|
|||
# Needs to be parameterized: $icofile, $URL, $ShortcutPath
|
||||
# Need to change paths and test/create if don't exist
|
||||
|
||||
|
||||
wget "https://www.example.com/logos/example.ico" -outfile "c:\agent\example.ico"
|
||||
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$path = "C:\Users\All Users\desktop\example.url"
|
||||
$targetpath = "https://example.com/"
|
||||
$iconlocation = "c:\agent\example.ico"
|
||||
$iconfile = "IconFile=" + $iconlocation
|
||||
$Shortcut = $WshShell.CreateShortcut($path)
|
||||
$Shortcut.TargetPath = $targetpath
|
||||
$Shortcut.Save()
|
||||
Add-Content $path "HotKey=0"
|
||||
Add-Content $path "$iconfile"
|
||||
Add-Content $path "IconIndex=0"
|
||||
|
Loading…
Reference in New Issue