How do you run executables and their parameters inside of Microsoft Powershell?
I am attempting to run the following block of code, and I am getting a black DOS window to appear and disappear. I translated a batch file over to Microsoft Powershell. I know that the code for making the bubble works below, but I am having trouble finding out why the code that I am running to make the same executables that were working withing the batch file not working inside of Powershell. My end goal with this project is to call the powershell code and run it once versus having a batch file call it. This file will be used on a great number of PCs, so all of them will have Powershell and Windows XP SP 3.
Set-ExecutionPolicy RemoteSignedif(!Test-Path C:\program Files\Logs\*.*){ New-Item C:\Program Files\Logs -type directory}Invoke-Item uninstall_flash_player.exe /clean /silentInvoke-Item msiexec.exe /I"install_flash_player_10_active_x.msi" REBOOT=ReallySuppress ALLUSERS=1 /qb-! /l*v "C:\Program Files\Logs\Adobe Flash Player 10.1 (EN).log"Invoke-Item copy "mms.cfg" "%windir%\system32\macromed\flash\mms.cfg" /Ypause[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") #System Tray Balloon Popup #The popup mesage $Message="Flash has been upgraded to 10.1 Successfully Contact the Service Desk if you have issues after the install." # Valid Message types "Info" "Error" "Warning" "None" $MessageType="Info" # The number of seconds to display the message. [int]$duration=60 #load Windows Forms and drawing assemblies [reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null [reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null #define an icon image pulled from PowerShell.exe $icon=[system.drawing.icon]::ExtractAssociatedIcon((join-path $pshome powershell.exe)) $notify = new-object system.windows.forms.notifyicon $notify.icon = $icon $notify.visible = $True #define the tool tip icon based on the message type switch ($messagetype) { "Error" { $messageIcon=[system.windows.forms.tooltipicon]::Error} "Info" {$messageIcon=[system.windows.forms.tooltipicon]::Info} "Warning" {$messageIcon=[system.windows.forms.tooltipicon]::Warning} Default {$messageIcon=[system.windows.forms.tooltipicon]::None} } $notify.showballoontip($duration,$Title,$message,$MessageIcon)
And what errors is it showing if any?