Why PowerShell does not run executables path and CMD does?

Anonymous
2022-06-24T17:32:09+00:00
  1. Why PowerShell does not run executables as shown in screenshot below and CMD does?

  1. I first opened PowerShell as admin and ran
  2. "C:\Users\xyz\Downloads\Acrobat_DC_Web_WWMUI\Adobe Acrobat\Setup.exe"
  3. Setup did not start.
  4. I then opened cmd as admin pasted "C:\Users\xyz\Downloads\Acrobat_DC_Web_WWMUI\Adobe Acrobat\Setup.exe" in cmd and able to run this setup.exe

Why can't we run "C:\Users\xyz\Downloads\Acrobat_DC_Web_WWMUI\Adobe Acrobat\Setup.exe" directly in PowerShell? I am trying to learn PowerShell but this I see as limitation.

Any suggestions/thoughts will be appreciated!

Windows for home | Windows 10 | Install and upgrade

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. DaveM121 816K Reputation points Independent Advisor
    2022-06-24T18:08:08+00:00

    Hi jackin

    I am Dave, I will help you with this.

    There are mand commands from Command Prompt that do not work in PowerShell

    Try this command in PowerShell

    [Diagnostics.Process]::Start("C:\Users\xyz\Downloads\Acrobat_DC_Web_WWMUI\Adobe Acrobat\Setup.exe")

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-06-24T18:59:21+00:00

    Hi jackin

    I am Dave, I will help you with this.

    There are mand commands from Command Prompt that do not work in PowerShell

    Try this command in PowerShell

    [Diagnostics.Process]::Start("C:\Users\xyz\Downloads\Acrobat_DC_Web_WWMUI\Adobe Acrobat\Setup.exe")

    I will try this, but even if it does work it would be slower process than CMD as it will require me to type more etc.

    Thanks for suggestions though.

    0 comments No comments
  2. Anonymous
    2022-06-28T04:22:15+00:00

    Thanks again next, I am trying to find a way to remove whitespaces from a whole paragraph using PowerShell. Any idea?

    For example:

    What is Lorem Ipsum?

    Lorem Ipsum is simply dummy text of the printing and typesetting industry.

    Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an

    unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,

    remaining essentially unchanged. It was popularised in the 1960s with the release of

    Letraset sheets containing Lorem Ipsum passages, and more recently with desktop

    publishing software like Aldus PageMaker

    including versions of Lorem Ipsum. 
    

    I tried ("C:\Users\xyz\Desktop\Test.txt").trim() this did not work.

    0 comments No comments