GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Can't start .msi from powershell core · Issue #4499 · PowerShell/PowerShell

Can't start .msi from powershell core #4499

New issue
Copy link
New issue
Copy link
Closed
Closed
Can't start .msi from powershell core#4499
Copy link
Assignees
daxian-dbw
Labels
Resolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Milestone
6.0.0-GA

Description

@SteveL-MSFT
Steve Lee (SteveL-MSFT)
opened on Aug 4, 2017
Issue body actions

Invoke-Item on the MSI does work

Steps to reproduce

PS C:\Users\slee\repos\PowerShell> .\PowerShell-6.0.0-beta.5-win10-win2016-x64.msi

Expected behavior

MSI installer to start

Actual behavior

Cannot run a document in PowerShell Core: C:\Users\slee\repos\PowerShell\PowerShell-6.0.0-beta.5-win10-win2016-x64.msi.
At line:1 char:1
+ .\PowerShell-6.0.0-beta.5-win10-win2016-x64.msi
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (C:\Users\slee\r...win2016-x64.msi:String) [], RuntimeException
    + FullyQualifiedErrorId : CantActivateDocumentInPowerShellCore

Environment data

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.5-8-g879b7da4ac327865570d3e696a744d49e8eb7c85-dirty
OS                             Microsoft Windows 10.0.16257
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

  1. Steve Lee (SteveL-MSFT)
    added
    WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
    on Aug 4, 2017
  2. Steve Lee (SteveL-MSFT)
    added this to the This milestone has been deleted milestone on Aug 4, 2017
  3. Steve Lee (SteveL-MSFT)
    changed the title [-]Can start .msi from powershell core[/-] [+]Can't start .msi from powershell core[/+] on Aug 4, 2017
  4. daxian-dbw commented on Aug 4, 2017

    @daxian-dbw
    Dongbo Wang (daxian-dbw)
    on Aug 4, 2017
    Member
    More actions

    ProcessStartInfo.UseShellExecute is now supported in .NET Core. On windows, it works as expected (opening the default applications associated with the file extension). However, the behavior is not expected on Linux (and probably on Mac too).

    Example:

    [E:\PowerShell]
    PS:132> $s = [System.Diagnostics.ProcessStartInfo]::new()
    [E:\PowerShell]
    PS:133> $s.UseShellExecute = $true
    [E:\PowerShell]
    PS:134> $s.FileName = "F:\tmp\text-utf8.txt"
    [E:\PowerShell]
    PS:135> [System.Diagnostics.Process]::Start($s)
    
     NPM(K)    PM(M)      WS(M)     CPU(s)     Id  SI ProcessName
     ------    -----      -----     ------     --  -- -----------
         14     3.05      15.86       0.06 ...148   1 Notepad2
    
    
    [E:\PowerShell]
    PS:136> start F:\tmp\
    [E:\PowerShell]
    PS:137> $s.FileName = "F:\tmp\doc.docx"
    [E:\PowerShell]
    PS:138>
    [E:\PowerShell]
    PS:138> [System.Diagnostics.Process]::Start($s)
    
     NPM(K)    PM(M)      WS(M)     CPU(s)     Id  SI ProcessName
     ------    -----      -----     ------     --  -- -----------
         11     4.56      11.62       0.06 ...148   1 WINWORD
    
  5. daxian-dbw commented on Aug 4, 2017

    @daxian-dbw
    Dongbo Wang (daxian-dbw)
    on Aug 4, 2017
    Member
    More actions

    So we actually need to clean up our code about the ShellExecuteEx implementation ...

  6. Dongbo Wang (daxian-dbw)
    self-assigned this
    on Aug 5, 2017
  7. Aditya Patwardhan (adityapatwardhan)
    closed this as completedin #4523on Aug 10, 2017
  8. Ilya (iSazonov)
    added
    Resolution-FixedThe issue is fixed.The issue is fixed.
    on Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @daxian-dbw
    Dongbo Wang (daxian-dbw)

Labels

Resolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime

Type

No type

Projects

No projects

    Milestone

    • 6.0.0-GA

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.