diff --git a/scripts_wip/Win_File_URL_Create_Shortcut.ps1 b/scripts_wip/Win_File_URL_Create_Shortcut.ps1 new file mode 100644 index 00000000..87013ba8 --- /dev/null +++ b/scripts_wip/Win_File_URL_Create_Shortcut.ps1 @@ -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" +