is there a way to make a gui with powershell so i can enter data to modify paths, etc.

i would like to have a gui so the user can select the type of computer they want to check/install programs on.
I currently have a working script to install adobe flash silently against a list of computers
but lets say i want to check for teamviewer, firefox, etc
i want the user to be able to simply enter the correct path to check for and then also the path to the install program.
i can do it manually by modifying the code each time but it would be easier with a gui.  Can someone help me.
below is workable code using the command line.

 . Program name: flashinstaller.ps1
 . Author: 
 . Date: 11/4/2015
 . Purpose: See if adobe shockwave/flash is installed. if not then install it silently
 .Version 1
 . Change Log:
 .   Version 1

 # need to connect to each computer in list and need to login as administrator then adminpassword to each pc
 "Flash installer by MIS"
 "Computer to upgrade?"
 "1) Manager" 
 "2) Training"

 $menuselect = read-host "Make a selection 1 or 2"
 switch ($menuselect) {
  1 {
       $arrComputers = Get-Content -Path "C:\pc.txt"  
  2 {
        $arrComputers = Get-Content -Path "C:\train.txt"

 $creds = Get-Credential
 $ErrorLog = "c:\scripterrors.txt"
 foreach ($strComputer in $arrComputers) {
    # check and see if the flash is installed
    # map the network drive

    New-PSDrive -name K -PSProvider FileSystem -Root \\$strComputer\c -Persist -Credential $creds
       if (Test-Path 'k:\Windows\System32\Macromed\Flash')
            write-host $strComputer " has Flash PLUGIN "
        else {
            write-host $strComputer "does not have FLASH copying files now"
            if ((Test-Path k:\temp) -eq 0) # if the path doesn't exist make it
                      write-host "temp folder doesn't exist"
                      mkdir z:\temp
                      #send files
                      Copy-Item f:\common\share\flash\adobeflash.msi -Destination k:\temp
            if ((test-path k:\temp) -eq 0) # see if the path was made
                    write-host "didn't make the temp dir what happen?"

            &psexec \\$strComputer -u administrator -p secret -s msiexec.exe /i "c:\temp\adobeflash.msi" /q 
			if (Test-Path 'k:\Windows\System32\Macromed\Flash')
            write-host $strComputer " PLUGIN INSTALLED SUCCESSFULLY "
      Remove-PSDrive  K
       "ERROR with location:  $strComputer" | Add-Content $ErrorLog

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

easiest option is to get user input.

try something like:

$suggestedpath = Read-Host -Prompt 'Please input the path (eg c:\test\)'

may be worth a little post processing to check the variable contains a valid path (in case the user enters something incorrectly.)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.