Jump to content

Deploying Cura unattended with Intune for school/enterprise environments. (With uninstall for older versions)


Recommended Posts

Posted (edited) · Deploying Cura unattended with Intune for school/enterprise environments. (With uninstall for older versions)

Hi all. Here is my First post in which I would like to share some information how you could deploy Cura via Microsoft Endpoint Manager - Intune. Of course you can also use this post to make your deployment for other MDM's like SCCM, Zenworks etc by using knowledge from this topic.


You can make an intunewin package that calls the install.cmd.

The instruction for intunewin is available here.

You can download the Microsoft-Win32-Content-Prep-Tool here.


Scope of the scripts:

  • It uninstalls older versions of Cura
  • It makes sure a firewall rule is created so that there is no firewall popup at first start that needs elevated permissions
  • It copies shortcuts in the start menu which is lacking in the current Cura 5.0.0 install.

 

For Cura 5.0.0 it currently looks like this:

install.cmd
 

SET INSTALLPATH=%~dp0
powershell.exe -executionpolicy Bypass -file "%INSTALLPATH%removeCura.ps1"
netsh advfirewall set  currentprofile state off
"%INSTALLPATH%Ultimaker-Cura-5.0.0-win64.exe" /S /quiet /norestart
del /F /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ultimaker Cura\*.*"
rd /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ultimaker Cura"
md "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ultimaker Cura"
copy "%INSTALLPATH%Development Resources.url" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ultimaker Cura\Development Resources.url"
copy "%INSTALLPATH%Online Documentation.url" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ultimaker Cura\Online Documentation.url"
timeout /t 30 /nobreak >nul
copy "%INSTALLPATH%Ultimaker-Cura 5.0.0.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ultimaker Cura\Ultimaker-Cura 5.0.0.lnk"
timeout /t 30 /nobreak >nul
copy "%INSTALLPATH%Uninstall Ultimaker Cura 5.0.0.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ultimaker Cura\Uninstall Ultimaker Cura 5.0.0.lnk"
netsh advfirewall set  currentprofile state on
netsh advfirewall firewall add rule name="Ultimaker Cura 5.0.0" dir=in action=allow program="C:\Program Files\Ultimaker Cura 5.0.0\Ultimaker-Cura.exe" enable=yes


removeCura.ps1

# Get installed Cura versions
$InstalledCuraVersions = Get-Package -Provider Programs -IncludeWindowsInstaller | Where-Object{$_.Name -like "*Cura*"}

# Loop through folders and uninstall
$InstalledCuraVersions | ForEach-Object {
    & "C:\Program Files\$($_.Name)\Uninstall.exe" /S
}

 

uninstall.cmd

"C:\Program Files\Ultimaker Cura 5.0.0\Uninstall.exe" /S
del /F /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ultimaker Cura\*.*"
rd /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ultimaker Cura"
netsh advfirewall firewall delete rule name="Ultimaker cura 5.0.0" program="C:\program files\Ultimaker cura 5.0.0\Ultimaker-Cura.exe"

 
I have attached a ZIP file that contains everything except the Cura 5.0.0 installer itself so you can create your intunewin package yourself. 

Ultimaker Cura 5.0.0.zip

Edited by That_tall_IT_dude
  • Like 2
  • Thanks 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Introducing the UltiMaker Factor 4
      We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
        • Like
      • 3 replies
    • UltiMaker Cura 5.7 stable released
      Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
       
        • Like
      • 26 replies
×
×
  • Create New...