Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Insert Function in Build-ContextMenu

$
0
0

Hello and thanks, please i have a powershell script that create a menu with options :

$objContextMenu | Build-ContextMenu -index 0 -text "NoTePaD" -Action "C:\Windows\notepad.exe"
$objContextMenu | Build-ContextMenu -index 1 -text "NoTePaD" -Action "C:\Windows\notepad.exe"
$objContextMenu | Build-ContextMenu -index 2 -text "HelP" -Action "C:\Windows\winhlp32.exe"

BUT i need to launch a function instead of open a program like this

$objContextMenu | Build-ContextMenu -index 0 -text "function" -Action (I Want to launch the function from here when the user click the menu)

Any suggestions??? Thank you!!!!!!!!!!



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>