The following process has been tested and confirmed as working with Gantt Project (Version: 2.0.10) and SCCM R2.
It does the following tasks:
- Silently install Gantt Project
- Associate .mpp files with Gantt Project
- Delete the desktop shortcut all all users
- Download the latest installer from http://www.ganttproject.biz/download
- Create a new file called ‘install.cmd’ and save the following information:
-
@ECHO OFF
"%~dp0ganttproject-2.0.10.exe" /S
REM associate MS Project files with GanttProject
%COMSPEC% /c assoc .mpp=GanttProject.MPP
%COMSPEC% /c ftype GanttProject.MPP="%ProgramFiles%\GanttProject\ganttproject.exe" "%%1"
REM move desktop shortcut to All Users desktop
%COMSPEC% /c xcopy %userprofile%\desktop\GanttProject.lnk %public%\desktop /Y
%COMSPEC% /c icacls %public%\desktop\GanttProject.lnk /inheritance:e
%COMSPEC% /c del %userprofile%\desktop\GanttProject.lnk /F /Q
REM Return exit code to SCCM
exit /B %EXIT_CODE% - Copy the installer file and install.cmd to your software package share
- You can now create your SCCM package or deploy the software by using install.cmd
Optional Step: Create an uninstall.cmd file
The following script can be used to silently un-install Gantt Project.
@ECHO OFF
%COMSPEC% /c assoc .mpp=*
%COMSPEC% /c ftype GanttProject.MPP=*
"C:\Program Files\GanttProject\uninstall.exe" /S
%COMSPEC% /c del %public%\desktop\GanttProject.lnk /F /Q
For more information on creating SCCM packages see distribute software using SCCM.