Link to home
Start Free TrialLog in
Avatar of DevSupport
DevSupport

asked on

powershell form variables write into batch file

Hi
I am creating a dataentry form (attached)  where I am trying to get values using the powershell form and write it into a batch file or text file in a specific way.

Attached is the ps script to collect values.

When I click ok button the event handler should ideally store value into $x which I should be able to write into file but I am unable to get it into a file.

I want the end result to be such that each variable from the fields should be written in the following format in a batch file

Something like set-content into a batch file

The outfile of file written should be :

set dbname=<database name from form>
set username=<Database login from form>
set dbservername=<selection from list box>
set inpwait=<true if check box is selected>

If you could give me an example for text box, listbox and checkbox i.e retrieving values into file when I click ok button. That would be great!

If you need more info please let me know.

Thanks
powershellform
ASKER CERTIFIED SOLUTION
Avatar of footech
footech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DevSupport
DevSupport

ASKER

Just for my understanding, what should be written inside $OKButton.Add_Click()

Thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank You so much! It works!