Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Powershell Command Find the error (s) echo off cls systeminfo | find /i \"System

ID: 3750908 • Letter: P

Question

Powershell Command

Find the error (s)

echo off
cls
systeminfo | find /i "System Type" | find /i "X86-based PC"
if %errorlevel% == 0 set spth="C:Program FilesShoreline CommunicationsShoreWare ClientShoretel.exe"
Echo Checking System Type (x86 vs x64)
systeminfo | find /i "System Type" | find /i "X64-based PC"
if %errorlevel% == 0 set spth="C:Program Files (x86)Shoreline CommunicationsShoreWare ClientShoretel.exe"

Echo Checking if Communicator is already installed.....
if exist %spth% goto end1
if NOT exist %spth% goto install

:install
echo Installing Shoretel Communicator
\cupe-fs-1ppsShortelConnectinstall-winGPOsetup.exe /S /v"/qn REBOOT=reallysuppress"
echo Installation Finished
exit

:end1
echo Shoretel Communicator is already installed.
ping 127.0.0.1 -n 5 > nul
exit

The ter ShoreTel ie not recognized as the nae of a cidlet. function, ecript file, or operable prograin. Check the spelling of the nathe, or if a path was included, verify that the path is At line 1 char: 11 +ShoreTel

Explanation / Answer

Hi,

I am giving the correct implementation below followed by the list of errors:

----------------------------------------------------------------------------------------------------------------------------

echo off
cls
systeminfo | find /i "System Type" | find /i "X86-based PC"
if ($LASTEXITCODE = 0)
{ set spth="C:Program FilesShoreline CommunicationsShoreWare ClientShoretel.exe"}

Echo "Checking System Type (x86 vs x64)"
systeminfo | find /i "System Type" | find /i "X64-based PC"
if ($LASTEXITCODE = 0) {set spth="C:Program Files (x86)Shoreline CommunicationsShoreWare ClientShoretel.exe"}

Echo "Checking if Communicator is already installed....."
if (Test-Path %spth%){

echo "Installing Shoretel Communicator"
\cupe-fs-1ppsShortelConnectinstall-winGPOsetup.exe /S /v"/qn REBOOT=reallysuppress"
echo "Installation Finished"
exit

}
if (!(Test-Path %spth%)) {
echo "Shoretel Communicator is already installed."
ping 127.0.0.1 -n 5 > ne
exit
}

----------------------------------------------------------------------------------------------------------------------------------

Now i will list down the errors in the program.

Hope this helps!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote