I was working with some powershell button that calls a .bat file. I have looked around but it only appears to work the other way around. I'm trying to figure out the syntax to call a .bat file from powershell button. This seems to work from command line, but I'm having issues with using it within my button. Any sugestions?
$StartButton = New-Object System.Windows.Forms.Button
$StartButton.Location = New-Object System.Drawing.Size(170, 450)
$StartButton.Size = New-Object System.Drawing.Size(125,43)
$StartButton.Font = New-Object System.Drawing.Font("Courier New", "10.5")
$StartButton.Text = "Start Tuner"
$StartButton.Add_Click(invoke-command{C:\temp\Map.bat})
$tunerForm.Controls.Add($StartButton)
Thanks anything is highly appreciated.