Quantcast
Viewing all articles
Browse latest Browse all 311

Customer Service • Compiled EXE Switch Parameter

I have a simple problem it seems. But can’t quite put my finger on it. I am using a multi form project in Powershell_studio. Switch parameters work fine in a ps1. But if trying to use switch parameters with the compiled exe, it seems to return nothing. This is the standard form which shows in startup.pss which is where the default form would start. After compiling, I am attempting the following. That simply opens the main form. I did try to return the value of the parameter. Also tried changing the parameter to a sting and passing some data with a return. Seems that nothing is being passed through or detected. Grateful for any help.

Start-Process -path “c:\temp\scipt.exe” -argumentlist ‘-NTFS_Admin’

function Main {
Param (
[Switch]$NTFS_Admin
)

if($NTFS_Admin){
if (Show-NTFSForm psf) -ea 'OK'){}
}
else{
if (Show-MainForm_psf) -eq 'OK'){}
}

$script:ExitCode = 0 #Set the exit code for the Packager
}

Statistics: Posted by Fatal_Err — Thu Apr 25, 2024 4:30 pm — Replies 1 — Views 51



Viewing all articles
Browse latest Browse all 311

Trending Articles