It does but i do have a question.
Lets forget the PowerShell app deployment toolkit.
I have a command line tool I am creating a PowerShell wrapper for and want to include it in my gui project
I cant seem to hit the command line executable when I include only when its in the same directory as the compiled PowerShell studio form exe
below is the code I am using that works when the command line tool is in the same directory , how can I hit it in the PowerShell studio exe when its included as "content" so I dont need it sitting side by side
#Sample variable that provides the location of the script
[string]$ScriptDirectory = Get-ScriptDirectory
$buttonDetect_Click={
$file = [IO.Path]::GetTempFileName()
($RegistryBox.Text).replace("`n", "`r`n") | Out-File $file -Force
$cmd = @(
". ""$ScriptDirectory\REG2PS_CMD.exe"""
"$file F"
)
$Result = "$cmd" | Invoke-Expression | select -Skip 1
$PowershellBox.Text = $result -join "`r`n"
}
Thanks!!
Lets forget the PowerShell app deployment toolkit.
I have a command line tool I am creating a PowerShell wrapper for and want to include it in my gui project
I cant seem to hit the command line executable when I include only when its in the same directory as the compiled PowerShell studio form exe
below is the code I am using that works when the command line tool is in the same directory , how can I hit it in the PowerShell studio exe when its included as "content" so I dont need it sitting side by side
#Sample variable that provides the location of the script
[string]$ScriptDirectory = Get-ScriptDirectory
$buttonDetect_Click={
$file = [IO.Path]::GetTempFileName()
($RegistryBox.Text).replace("`n", "`r`n") | Out-File $file -Force
$cmd = @(
". ""$ScriptDirectory\REG2PS_CMD.exe"""
"$file F"
)
$Result = "$cmd" | Invoke-Expression | select -Skip 1
$PowershellBox.Text = $result -join "`r`n"
}
Thanks!!
Statistics: Posted by halexand_sfwmd — Sat Jan 20, 2024 12:18 pm