Page 1 of 1

Pass parameters to another forms application.

Posted: Wed Oct 10, 2018 4:28 pm
by petera
To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2018 v5.5.154
32 or 64 bit version of product: 64
Operating system: Server 2012 R2
32 or 64 bit OS: 64

*** Please add details and screenshots as needed below. ***

I have created a forms PSF project that i am using to update customers. The form is what I call an MultiBankUpdateMgr" that is used to extract a zip file, that contains an update PSF project, that I call "DepositsUpdate" that does the actual update.

The MultiBankUpdateMgr calls the DepositsUpdate, and I need to pass a filePath parameter called multibankXmlFilePath to the DepositsUpdate program.

I would like the DepositsUpdate to be an exe file, but am willing to do anything to get it to work. No matter how I try to pass the parm to the project, the DepositsUpdate says the parameter is blank.

I have tried:
Start-Process Powershell.exe -ArgumentList " -noexit -File `"$startProg`" '$multibankXmlFilePath' " -Verb runas
Start-Job -filepath $startProg -argumentlist $multibankXmlFilePath
Invoke-Command -filepath $startProg -ArgumentList $multibankXmlFilePath
Nothing works.

I have attached both projects to this.

Re: Pass parameters to another forms application.

Posted: Thu Oct 11, 2018 1:36 pm
by davidc

You need to have a parameter block in the startup.pss file and then pass the parameter again to the Show-OnboardUpdate_psf reference function.

I recommend reading the following articles:

Passing parameter to a packaged executable:

Passing parameters to GUI forms:

Re: Pass parameters to another forms application.

Posted: Mon Oct 15, 2018 3:36 pm
by petera
I was able to get that to work. Thanks.