mirror of
https://github.com/rvrsh3ll/Misc-Powershell-Scripts
synced 2026-06-21 14:09:04 +00:00
Added PDF Extension
This commit is contained in:
+10
-2
@@ -22,7 +22,7 @@ function Create-HotKeyLNK {
|
||||
|
||||
.PARAMETER IconPath
|
||||
|
||||
Path to an exe for an icon. Defaults to Internet Explorer.
|
||||
Path to an exe for an icon. Defaults to Internet Explorer. Use "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe,13" for PDF extension.
|
||||
|
||||
.PARAMETER HotKey
|
||||
|
||||
@@ -60,6 +60,10 @@ function Create-HotKeyLNK {
|
||||
[String]
|
||||
$IconPath = "$env:programfiles\Internet Explorer\iexplore.exe",
|
||||
|
||||
[Parameter(Mandatory=$False)]
|
||||
[Switch]
|
||||
$PDFIcon,
|
||||
|
||||
[Parameter(Mandatory=$False)]
|
||||
[String]
|
||||
$HotKey = "CTRL+V",
|
||||
@@ -83,7 +87,11 @@ function Create-HotKeyLNK {
|
||||
$link.WindowStyle = '7'
|
||||
$link.TargetPath = $EXEPath
|
||||
$link.HotKey = $HotKey
|
||||
$link.IconLocation = $IconPath
|
||||
if ($PDFIcon) {
|
||||
$link.IconLocation = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe,13"
|
||||
} else {
|
||||
$link.IconLocation = $IconPath
|
||||
}
|
||||
$link.Arguments = $arguments
|
||||
$link.Save()
|
||||
Write-Host "Done!"
|
||||
|
||||
Reference in New Issue
Block a user