Hello,
Now that I've been back in the office I see this script is amazing, but not quite what I'm looking for. Let me explain my use case:
We manually copy OSD boot media from a shared drive to USBs when the engineers require it, sometimes that requires drives to be formatted to FAT32
Last count is about 60 drives being updated
I would like to create a gui that the techs run after USBs are inserted
It lists the drives in the tree view
Techs click build
We use the script from earlier to build the drives
Once done, the status bar and progress bar both say complete
Finally, if the users attempt to start the application without USBs attached, I catch the error in the load event and advise them and close the form
Currently what I have is working better than I imagined but I think one thing would be nice
When the jobscript completes and there are more than 1 drive plugged in, I would like the treeview and progress bar step with it
Multi USB OSDBootMedia Solution
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.
Re: Multi USB OSDBootMedia Solution
To update the treeview and progressbar I must add code to the -UpdateScript within my Start Job button’s click event, yes?
Re: Multi USB OSDBootMedia Solution
And I know to start here https://info.sapien.com/index.php/guis/ ... sive-forms
Re: Multi USB OSDBootMedia Solution
My job appears to be updating everything besides the treeview just fine.
I found this
https://info.sapien.com/index.php/guis/ ... ew-control
and then the property NextNode, but I get this error
ERROR: Method invocation failed because [System.Windows.Forms.TreeNode] does not contain a method named 'NextNode'.
I found this
https://info.sapien.com/index.php/guis/ ... ew-control
and then the property NextNode, but I get this error
ERROR: Method invocation failed because [System.Windows.Forms.TreeNode] does not contain a method named 'NextNode'.
- $results = Receive-Job -Job $Job
- foreach ($item in $results | Where-Object {$_ -match "Make-OSDBootMedia.builddate"})
- {
- $richtextbox1.Text += $item
- $progressbaroverlay1.PerformStep()
- $progressbaroverlay1.TextOverlay = 'Starting Next Drive'
- $node = $treeView1.SelectedNode
- while ($node -ne $null)
- {
- $node = $node.NextNode
- $treeview1.SelectedNode.NextNode($node)
- }
- }