I have a form that reads the xml file into the dropdown box.
So far working as expected.
The plan is to gather some info and then run it in winpe before the MDT build.
So only issue so far is i have a $Form.Close() at the end of the script and that is generating an error:
ERROR: You cannot call a method on a null-valued expression.
ComboBOx-XML.psf (87, 3): ERROR: At Line: 87 char: 3
ERROR: + $Form.Close()
ERROR: + ~~~~~~~~~~~~~
ERROR: + CategoryInfo : InvalidOperation: (:) [], RuntimeException
ERROR: + FullyQualifiedErrorId : InvokeMethodOnNull
ERROR:
What am i missing?
Thank you.
$Form.Close()
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- petrosphere
- Posts: 1
- Last visit: Sat Apr 11, 2020 7:04 pm
Re: $Form.Close()
You need to add this to your script:
I generally add it right after the OnApplicationLoad function.
- function OnApplicationExit {
- $script:ExitCode = 0 #Set the exit code for the Packager
- }