Windows 10: PowerShell choice menu wait for choice to finish

Discus and support PowerShell choice menu wait for choice to finish in Windows 10 Network and Sharing to solve the problem; Hello, I am just getting started with PowerShell and need some advice please. I have a script that has a choice menu to install software. The... Discussion in 'Windows 10 Network and Sharing' started by dippncope, Jan 21, 2021.

  1. dippncope Win User

    PowerShell choice menu wait for choice to finish


    Hello, I am just getting started with PowerShell and need some advice please.

    I have a script that has a choice menu to install software. The Installations are started with batch files and ps1 files.

    If I only select 1 choice it works fine. However if I select 2 the choices fail because both are trying to run

    I have tried Out-Null, -wait but I cant get the script to wait between choices.

    Below is what I have. If someone can point me in the right direction it would be greatly appreciated.





    $b1= $false

    $b2= $false

    $b3= $false

    $b4= $false

    new-psdrive -name "z" -psprovider filesystem -root "\\installserver"

    #----------------------------------------------

    #Generated Event Script Blocks

    #----------------------------------------------



    $handler_button1_Click=

    {

    $listBox1.Items.Clear;



    if $install1.Checked { $listBox1.Items.Add "Installed software1";& \\server1\\install1.ps1 " }



    if $install1.2Checked { $listBox1.Items.Add "Installed Software2";& cmd.exe /C start /wait '\\server2\\install.bat' " }



    if $install3.Checked { $listBox1.Items.Add "Installed software3" ;& cmd.exe /C start /wait 'Z:\nstall.bat' " }



    if $install4.Checked { $listBox1.Items.Add "Installed software4 " ;& cmd.exe "/C Z:\folder\install.bat" " }





    if !$install1.Checked -and !$install2.Checked -and !$install3Checked -and !$install4.Checked { $listBox1.Items.Add"No CheckBox selected...."}

    :)
     
    dippncope, Jan 21, 2021
    #1

  2. welcome screen is not asking if i like the spotlight choice

    Hi,

    One of the possible reasons why your laptop is not asking if you like the spotlight choice might be because the Windows spotlight is not set as your lock screen background. To address this concern, we suggest enabling Windows spotlight as your lock screen
    background. To do so, follow these steps:

    • Go to Settings.
    • Click on Personalization and then select Lock screen.
    • Under Background, click on the drop down menu and make sure to click on Windows spotlight.

    If further assistance is needed, don't hesitate to reply on this thread.
     
    Darleen Pen, Jan 21, 2021
    #2
  3. Saving files from PHOTO, Video - the only choice is "video file" no other choice

    How do I save a trimmed MP4 file I made in PHOTO...

    The only choice when I click Finish/Export is Video File and this I don't know how to convert.

    All instructions on the web I can find suggest that MP4 should also be an option for me when I export, but it isn't.

    Please explain what to do to have this choice of MP4.

    Thank you.
     
    Ruth T Naylor, Jan 21, 2021
    #3
  4. PowerShell choice menu wait for choice to finish

    Swype - problem on word choice list

    Hey guys, I'm using nokia 5800 currently. I had just installed Swype apps and I found out that one issue arised when I'm texting.



    The problem is the word choice list provided is some sort of "boxes" other than alphabet shown , that means I cannot read what was suggested by swype.



    Please suggest solutions for the problem.:smileysad:
     
    weekiattan, Jan 21, 2021
    #4
Thema:

PowerShell choice menu wait for choice to finish

Loading...
  1. PowerShell choice menu wait for choice to finish - Similar Threads - PowerShell choice menu

  2. Why is there no "Delete" choice in context menu

    in Windows 10 Gaming
    Why is there no "Delete" choice in context menu: When I highlight a folder and right click there is not option to delete the selected folder.For files the option is there. https://answers.microsoft.com/en-us/windows/forum/all/why-is-there-no-delete-choice-in-context-menu/3b0cecd7-0e20-4011-99e8-04cebb880d43
  3. Why is there no "Delete" choice in context menu

    in Windows 10 Software and Apps
    Why is there no "Delete" choice in context menu: When I highlight a folder and right click there is not option to delete the selected folder.For files the option is there. https://answers.microsoft.com/en-us/windows/forum/all/why-is-there-no-delete-choice-in-context-menu/3b0cecd7-0e20-4011-99e8-04cebb880d43
  4. 21H1 - Now or wait for it, your choice

    in Windows 10 Installation and Upgrade
    21H1 - Now or wait for it, your choice: 21H1 has started rolling out & will over the next few weeks. You can wait for it to show up in WU OR you can have it, NOW. To have it without waiting use MCT. Download it, run it hitting Update Now. Cheers, Drew...
  5. Disc choice

    in Windows 10 Network and Sharing
    Disc choice: What is the best disc to use to record my LPNs ? in music folder, WAV format I have CD-R, CD-RW DVD-R, DVD-RW. https://answers.microsoft.com/en-us/windows/forum/all/disc-choice/3e92e995-164a-4454-9270-ae22220986c5
  6. Password Choice

    in AntiVirus, Firewalls and System Security
    Password Choice: Why does Microsoft not allow users to choose their own password? You change your password once with Microsoft and then you are stuck in the endless and merciless cycle of not remembering your new password and not being allowed to use your old password. Its one of the most...
  7. Antivirus choice

    in AntiVirus, Firewalls and System Security
    Antivirus choice: Hi i got very disappointed with Windows Defender, it kept deleting files, which I knew to be safe, so disabled everything about it I could find.then I began the search for a replacement. I can’t afford yearly subscriptions, so looked for free alternatives. I am unable to...
  8. Career choices

    in Windows 10 Support
    Career choices: I am going to college in a few years and wanted to do pc repairs and/or open my own place. I had a question for you guys who own your own tech repair places/owned your own tech repair places: what education did you have if any? Any comments or info would be helpful. 150033
  9. Choices

    in Windows 10 Customization
    Choices: Is anyone else tired of being told I can't do something can't disable quick access in file explorer can't remove Bing can't get Cortana do use Google can't use network sharing any more and the list goes on,] I'm sure you have a few things to add as well Why does it...
  10. ad choice

    in AntiVirus, Firewalls and System Security
    ad choice: How can I get rid of this? It takes up my screen and makes start up very slow Thank you! https://answers.microsoft.com/en-us/windows/forum/all/ad-choice/38f9182a-6da7-4e55-a17d-07c497f9ee95"