Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Creating an iexpress executable from a powershell script. Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
Post Body

Hi All

Im trying to package a few applications in one executable.

My scenario is this. I have one main MSI File and two .exe's that need to be installed before the MSI is installed.

Here is the script I have made:


$urlWebViewLoc = ".\webview2.exe" $DeskDirectorInstaller = ".\client_desktop_app.msi" $dotnetLOC = ".\windowsdesktop-runtime-6.0.7-win-x64.exe"

Start-Process -wait -FilePath $urlWebViewLoc -ArgumentList "/silent /install" -Verb RunAs Start-Process -wait -FilePath $dotnetLOC -ArgumentList "/silent /install" -Verb RunAs

foreach($msiFiles in ($_msiFiles = Get-ChildItem $_Source -Recurse | Where{$.Extension -eq ".msi"} | Where-Object {!($_.psiscontainter)} | Select-Object -ExpandProperty FullName)) { msiexec /i $_msiFiles /passive }


When I run this directly via powershell the script works fine, the first two applications install then the msi installs

IE Express allows for a command line to be the application starter, so when I test this by running the following command prompt im getting an error message

PowerShell.exe -executionpolicy bypass -File "F:\deskdirector\Liberty Portal - iexpress Installer.ps1"

The error message im getting is this:

Start-Process : This command cannot be run due to the error: The system cannot find the file specified.

Does anyone know why this is happening? is there some trick to get this to work? or am I trying to do something that isnt really possible

Thanks

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
45,934
Link Karma
35,947
Comment Karma
8,957
Profile updated: 6 days ago
Posts updated: 6 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago