Tuesday, June 2, 2015

Deploy Orwell Dev-C++ 5.11 with ConfigMgr

The Orwell Dev-C++ 5.11 application deployment is a straight forward install, it looks like they made it easier since the last version I checked out, 5.6.2. The ProgramFiles(x86)\Dev-Cpp\MinGW64 folder is now created during install instead of during first run, which use to cause problems for non administrators and multi user computers.
First you should install the application on a test computer to setup the first time configurations.
Pick your language.
Pick your theme.

After you are done configuring your install, a folder called Dev-Cpp will be created in %userprofile%\AppData\Roaming\ .

Copy this folder to your source. We will copy it into the default users profile during the install so that all new users on a system will not get the first time configuration prompts. This folder should be recreated each time you update your application with a newer version, otherwise you will have compiler paths to previous versions in your settings, which may not exist anymore and the user will get a prompt each time the program is run.

Put the installer and this script below into your source along with the "Dev-Cpp folder".

# Copy User Config Files
Copy-Item -Path .\Dev-Cpp -Destination "$ENV:SYSTEMDRIVE\Users\Default\AppData\Roaming\Dev-Cpp" -Recurse -Force

$InstallArgs = "/S /v/qn"
Start-Process .\"Dev-Cpp 5.11 TDM-GCC 4.9.2 Setup.exe" -ArgumentList $InstallArgs -Wait

# Remove Shortcut
if (Test-Path '$ENV:PUBLIC\Desktop\Dev-C++.lnk')
 Remove-Item -Path '$ENV:PUBLIC\Desktop\Dev-C++.lnk' -Force
Create your ConfigMgr application, for the Detection Method I use the Uninstall location of the registry and the version #.