SOLVED

MSIX Virtual Container Opening Issue with command "Invoke-CommandInDesktopPackage -PackageFamilyName

%3CLINGO-SUB%20id%3D%22lingo-sub-2552627%22%20slang%3D%22en-US%22%3EMSIX%20Virtual%20Container%20Opening%20Issue%20with%20command%20%22Invoke-CommandInDesktopPackage%20-PackageFamilyName%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2552627%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3EAny%20Idea%20why%20I%20am%20not%20able%20to%20open%20the%20virtual%20cmd.exe%2Fregedit.exe%2Fnotepad.exe%20with%20below%20command%20line.%3C%2FP%3E%3CP%3EInvoke-CommandInDesktopPackage%20-PackageFamilyName%20WS-FTP-Professional_cd0wgck2zs9pm%20-AppId%20WS-FTP-Professional%20-Command%20%22cmd.exe%22%20-PreventBreakaway%3CBR%20%2F%3EInvoke-CommandInDesktopPackage%20%3A%20System.ArgumentException%20occurred%20when%20attempting%20to%20invoke%20the%20provided%20command%20in%20desktop%20package.%20Run%3CBR%20%2F%3EInvoke-CommandInDesktopPackage%20-%3F%20for%20usage%20details.%20Additional%20detail%3A%20Value%20does%20not%20fall%20within%20the%20expected%20range.At%20line%3A1%20char%3A1%3CBR%20%2F%3E%2B%20Invoke-CommandInDesktopPackage%20-PackageFamilyName%20WS-FTP-Professional%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BInvoke-CommandInDesktopPackage%5D%2C%20ArgumentException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20System.ArgumentException%2CMicrosoft.Windows.Appx.PackageCommands.InvokeCommandInDesktopPackage%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2552627%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%20MSIX%20Container%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Econtainer%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EInvoke-CommandDesktopPacakge%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2555192%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Virtual%20Container%20Opening%20Issue%20with%20command%20%22Invoke-CommandInDesktopPackage%20-PackageF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2555192%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1099635%22%20target%3D%22_blank%22%3E%40Siva116%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20you%20tried%20passing%20the%20full%20path%20to%20cmd.exe%20as%20a%20parameter%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20still%20cannot%20get%20it%20running%20maybe%20you%20want%20to%20download%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.advancedinstaller.com%2Fhover.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EHover%3C%2FA%3E%2C%20it%20is%20small%20free%20tool%20we%20built.%26nbsp%3B%20It%20provides%20a%20GUI%20wrapper%20over%20the%20same%20PS%20commandlet%2C%20which%20allows%20you%20to%20easily%20launch%20an%20EXE%20inside%20the%20container%20of%20your%20desired%20application.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBogdan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2562017%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Virtual%20Container%20Opening%20Issue%20with%20command%20%22Invoke-CommandInDesktopPackage%20-PackageF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2562017%22%20slang%3D%22en-US%22%3EThanks%20a%20lot%20I%20have%20provided%20full%20path%20of%20cmd.exe%2Fnotepad.exe%2Fregedit.exe.....%20all%20worked%2C%20now%20able%20to%20open%20virtual%20things%2C%20but%20not%20sure%20why%20even%20it%20was%20not%20opened%20by%20MSIXcommander.exe%20tool..%20I%20tried%20with%20it%20and%20Hover..%20I%20will%20try%20it.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi All,

Any Idea why I am not able to open the virtual cmd.exe/regedit.exe/notepad.exe with below command line.

Invoke-CommandInDesktopPackage -PackageFamilyName WS-FTP-Professional_cd0wgck2zs9pm -AppId WS-FTP-Professional -Command "cmd.exe" -PreventBreakaway
Invoke-CommandInDesktopPackage : System.ArgumentException occurred when attempting to invoke the provided command in desktop package. Run
Invoke-CommandInDesktopPackage -? for usage details. Additional detail: Value does not fall within the expected range.At line:1 char:1
+ Invoke-CommandInDesktopPackage -PackageFamilyName WS-FTP-Professional ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : NotSpecified: (:) [Invoke-CommandInDesktopPackage], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.Windows.Appx.PackageCommands.InvokeCommandInDesktopPackage

2 Replies
best response confirmed by Siva116 (Occasional Contributor)
Solution

Hi @Siva116 

 

Have you tried passing the full path to cmd.exe as a parameter? 

 

If you still cannot get it running maybe you want to download Hover, it is small free tool we built.  It provides a GUI wrapper over the same PS commandlet, which allows you to easily launch an EXE inside the container of your desired application.

 

Bogdan

Thanks a lot I have provided full path of cmd.exe/notepad.exe/regedit.exe..... all worked, now able to open virtual things, but not sure why even it was not opened by MSIXcommander.exe tool.. I tried with it and Hover.. I will try it.