rdkli
asked on
On click on http link run Powershell Script - How to get the link as variable
Hi Folks
Currently when we click a hyperlink, it runs a VBS Script to determine if the link is internal (normally run Browser) or external (run IE from rdp-connection).
Now I need to upgrade the script to powershell.
My Current problem is: When I click on a Link to run a ps-script, how do I reach the clicked link to determine if it's internal or external?
In vbs it would be Wscript.Arguments(0) to work with. But what is it in Powershell? Has anyone a clue?
Best Wishes
Currently when we click a hyperlink, it runs a VBS Script to determine if the link is internal (normally run Browser) or external (run IE from rdp-connection).
Now I need to upgrade the script to powershell.
My Current problem is: When I click on a Link to run a ps-script, how do I reach the clicked link to determine if it's internal or external?
In vbs it would be Wscript.Arguments(0) to work with. But what is it in Powershell? Has anyone a clue?
Best Wishes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yep, args is the solution.
Well - we edited some registry entries in HKEY_Classes_Root for ftp, http and https. Under http\shell\open\command you can enter a script which should run.
Currently I have the value : <C:\windows\system32\windo
In the powershell script i can use args[0] to handle the Link.
Thanks for coming up with the args :-)