Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

call script event

$
0
0

I have a puzzling problem:

I have a script that when I click in a button, it runs another .ps1 script. In Powershell ISE it works perfectly, but when I start from a Batch Script it not work, not start the second script.
The event:

Register-ObjectEvent $call_x1 Click click_event -Action {
    Invoke-Expression "E:\Tests\x1.ps1"


Viewing all articles
Browse latest Browse all 6937

Trending Articles