Tech Community Live: Microsoft Intune
Oct 01 2024, 07:30 AM - 11:30 AM (PDT)
Microsoft Tech Community

Install.ps1

Iron Contributor

I packaged an application to intunewin and now I want to execute this application using powershell script.

 

For example - DellUpdateCommand.intunewin

 

I have the powershell script in install command

 

Install command - powershell.exe -executionpolicy Bypass -file .\install.ps1

UnInstall command - powershell.exe -executionpolicy Bypass -file .\Uninstall.ps1

 

My problem is in the install.ps1 file I want to make sure that it is executing the DellUpdateCommand.intunewin file

 

How to?

9 Replies
.intunewin file is just a compress file. In that file you need to have the powershell cmdlets and the dellupdatecommand tool.
After downloading, the intunewin file will be unpacked and install.ps1 will be started.
Is there anything else that you are running as part of the install ps1 file?
# install.ps1

So, can I have this in the install.ps1? Will the Intunewin file extract itself? Should this file install.ps1 be packaged along with the exe file?

# Example: Install Dell Command | Update
Start-Process -FilePath ".\Dell-Command-Update.exe" -ArgumentList "/s" -Wait

Nothing Just trying to run this intunewin file thats all.
Then why not just import and deploy the intune app directly? Is the intune file just containing the dell utility? If yes, then you should include both the Dell utility and the installation script as part of the same payload.
Start-Process -FilePath ".\Dell-Command-Update.exe" -ArgumentList "/s" -Wait

Should I use this as the install.ps1
I totally forgot how I used to do it. **bleep**

Should I extract the intunewin file to the local machine first and then it has to install?

$intunewinFilePath = "C:\Path\To\Your\App.intunewin"
$extractPath = "C:\Path\To\Your\ExtractedFiles"
Expand-Archive -Path $intunewinFilePath -DestinationPath $extractPath -Force


# install.ps1
# Example: Install Dell Command | Update
Start-Process -FilePath ".\Dell-Command-Update.exe" -ArgumentList "/s" -Wait
# Add other installation steps as needed
Sounds about right. You shouldn’t be required to extract the contents of the Win32 app as part of script execution. Intune will do the extraction anyway. Just call the installer with relevant switches in your ps1 file and wrap that together with the installer file. Import it, call ps1 in cmd and add the detection logic.
Yes. As mentioned above, Intune will decrypt, unzip the file on the local machine. Just make sure that your install commando is equal to install.ps1 in Intune itself.