Create Win_Shortcut_Creator.ps1
This commit is contained in:
parent
e848a9a577
commit
870bf842cf
|
@ -0,0 +1,16 @@
|
|||
md -Path 'C:\agent' -Force
|
||||
wget "http://www.yourwebsite.com/logos/yourico.ico" -outfile "c:\agent\yourico.ico"
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$path = "C:\Users\All Users\desktop\Jaxsupport.url"
|
||||
$targetpath = "https://yourwebsite.com"
|
||||
$iconlocation = "c:\agent\yourico.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"
|
||||
|
||||
# This will create and agent directory then download the ico file
|
||||
# change ico file and location to download
|
Loading…
Reference in New Issue