Quantcast
Channel: SAPIEN Forums
Viewing all articles
Browse latest Browse all 546

PowerShell Studio • Re: Custom Powershell Modules Shared value not saving In Empty form Project

$
0
0
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!!

Statistics: Posted by halexand_sfwmd — Sat Jan 20, 2024 12:18 pm



Viewing all articles
Browse latest Browse all 546

Trending Articles