Thanks!
Tested this by creating an exe, then dragging MySoft.msi to the exe.
This is the output/error:
ERROR: Cannot convert value ""C:\Users\MyUser\Desktop\MySoft.msi"" to type "System.IO.DirectoryInfo". Error: "Illegal
ERROR: characters in path."
ERROR: At line:75 char:3
ERROR: + $global:file = [system.io.directoryinfo]$commandarg
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : InvalidArgument: (:) [], RuntimeException
ERROR: + FullyQualifiedErrorId : InvalidCastConstructorException
ERROR:
Open document with exe of Sapien PS Studio
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Open document with exe of Sapien PS Studio
This seems to work!
$commandargFormatted = $commandarg -replace ('"','')
$global:file = [system.io.directoryinfo]$commandargFormatted
$commandargFormatted = $commandarg -replace ('"','')
$global:file = [system.io.directoryinfo]$commandargFormatted