This will automate the install of Notepad ++ and Disable Update Notifications using the config.model.xml file.
Create your Folder Structure:
\\ConfigMgrSourceServer\Apps\NotepadPlusPlus\VersionNumber\
Download Notepad++ here:https://notepad-plus-plus.org/download/
Scripts & Files available here: http://garytown.com/Downloads/NotepadPlusPlus.zip
Download the EXE into the folder (Delete the blank place holder)
Create your Install & Uninstall Scripts:
load_npp.cmd Script:
-----------------------------
REM Notepad ++ Install Script REM Remove old Updater Folder (Created during last install) rmdir "C:\Program Files (x86)\Notepad++\updaterdisable" /S /Q REM Run Notepad++ Installer File Silently REM Using FOR Loop to find any EXE file and run it with these arguments for %%i in (*.exe) do cmd /c "%%i" /S REM Move the Update Tools to another folder rendering them useless move "C:\Program Files (x86)\Notepad++\updater" "C:\Program Files (x86)\Notepad++\updaterdisable" REM Copy ConfigFile that disables updates (This only works for Users who never launched software - This file builds the user's profile config the first run) copy config.model.xml "C:\Program Files (x86)\Notepad++\config.model.xml" /Y
------------------------------
Uninstall_npp.cmd
------------------------------
REM Notepad ++ UnInstall Script taskkill /F /IM notepad++* REM Remove old Updater Folder (Created during last install) rmdir "C:\Program Files (x86)\Notepad++\updaterdisable" /S /Q REM Run Notepad++ Installer File Silently "C:\Program Files (x86)\Notepad++\uninstall.exe" /S REM Pause for a few seconds to allow the uninstaller to complete and ensure correct uninstall detection by ConfigMgr sleep 5 REM Remove old Updater Folder (Created during last install) rmdir "C:\Program Files (x86)\Notepad++" /S /Q
-------------------------
config.model.xml file (This will set specific settings for your environment)
<?xml version="1.0" encoding="Windows-1252" ?> <NotepadPlus> <GUIConfigs> <!-- 3 status : "large", "small" or "hide"--> <GUIConfig name="ToolBar">standard</GUIConfig> <!-- 2 status : "show" or "hide"--> <GUIConfig name="StatusBar">show</GUIConfig> <!-- For all attributs, 2 status : "yes" or "no"--> <GUIConfig name="TabBar" dragAndDrop="yes" drawTopBar="yes" drawInactiveTab="yes" reduce="yes" closeButton="yes" doubleClick2Close="no" vertical="no" multiLine="no" hide="no" /> <!-- 2 positions : "horizontal" or "vertical"--> <GUIConfig name="ScintillaViewsSplitter">vertical</GUIConfig> <!-- For the attribut of position, 2 status : docked or undocked ; 2 status : "show" or "hide" --> <GUIConfig name="UserDefineDlg" position="undocked">hide</GUIConfig> <GUIConfig name="TabSetting" size="4" replaceBySpace="no" /> <!--App position--> <GUIConfig name="AppPosition" x="30" y="27" width="955" height="659" isMaximized="no" /> <!-- For the primary scintilla view, 2 status for Attribut lineNumberMargin, bookMarkMargin, indentGuideLine and currentLineHilitingShow: "show" or "hide" 4 status for Attribut folderMarkStyle : "simple", "arrow", "circle" and "box" --> <GUIConfig name="ScintillaPrimaryView" lineNumberMargin="show" bookMarkMargin="show" folderMarkStyle="box" indentGuideLine="show" currentLineHilitingShow="show" Wrap="no" edge="no" edgeNbColumn="100" wrapSymbolShow="hide" zoom="0" whiteSpaceShow="hide" eolShow="hide" /> <!-- For the secodary scintilla view, 2 status for Attribut lineNumberMargin, bookMarkMargin, indentGuideLine and currentLineHilitingShow: "show" or "hide" 4 status for Attribut folderMarkStyle : "simple", "arrow", "circle" and "box" --> <GUIConfig name="Auto-detection">yes</GUIConfig> <GUIConfig name="CheckHistoryFiles">no</GUIConfig> <GUIConfig name="TrayIcon">no</GUIConfig> <GUIConfig name="RememberLastSession">yes</GUIConfig> <!-- New Document default settings : format = 0/1/2 -> win/unix/mac encoding = 0/1/2/3/4/5 -> ANSI/UCS2Big/UCS2small/UTF8/UTF8-BOM defaultLang = 0/1/2/.. Note 1 : UTF8-BOM -> UTF8 without BOM Note 2 : for defaultLang : 0 -> L_TXT 1 -> L_PHP ... (see source file) --> <GUIConfig name="NewDocDefaultSettings" format="0" encoding="4" lang="0" codepage="-1" openAnsiAsUTF8="yes" /> <GUIConfig name="langsExcluded" gr0="0" gr1="0" gr2="0" gr3="0" gr4="0" gr5="0" gr6="0" gr7="0" langMenuCompact="yes"/> <!-- printOption is print colour setting, the following values are possible : 0 : WYSIWYG 1 : Invert colour 2 : B & W 3 : WYSIWYG but without background colour --> <GUIConfig name="Print" lineNumber="no" printOption="0" headerLeft="$(FULL_CURRENT_PATH)" headerMiddle="" headerRight="$(LONG_DATE) $(TIME)" headerFontName="IBMPC" headerFontStyle="1" headerFontSize="8" footerLeft="" footerMiddle="-$(CURRENT_PRINTING_PAGE)-" footerRight="" footerFontName="" footerFontStyle="0" footerFontSize="9" margeLeft="0" margeTop="0" margeRight="0" margeBottom="0" /> <!-- Backup Setting : 0 : non backup 1 : simple backup 2 : verbose backup --> <GUIConfig name="Backup" action="0" useCustumDir="no" dir="" /> <GUIConfig name="TaskList">yes</GUIConfig> <GUIConfig name="SaveOpenFileInSameDir">no</GUIConfig> <!-- value 0 for the folloing parameters means invisible : leftWidth, topHight, rightWidth, bottomHight position value for the PluginDlg: 0 : left 1 : right 2 : top 3 : bottom >= 4 : undocked -> FloatingWindow id --> <GUIConfig name="noUpdate">yes</GUIConfig> <GUIConfig name="MaitainIndent">yes</GUIConfig> <GUIConfig name="MRU">yes</GUIConfig> <GUIConfig name="URL">2</GUIConfig> <GUIConfig name="globalOverride" fg="no" bg="no" font="no" fontSize="no" bold="no" italic="no" underline="no" /> <GUIConfig name="auto-completion" autoCAction="3" triggerFromNbChar="1" funcParams="yes" /> <GUIConfig name="auto-insert" parentheses="yes" brackets="yes" curlyBrackets="yes" quotes="no" doubleQuotes="yes" htmlXmlTag="no" /> <GUIConfig name="multiInst" setting="0" /> <GUIConfig name="sessionExt"></GUIConfig> </GUIConfigs> <!-- The History of opened files list --> <History nbMaxFile="15" /> </NotepadPlus>
---------------------------
I’m going to skip some of the pictures, and go right to the deployment type & detection methods, look at previous posts for a template to go from.
In the Content Tab, make sure it is pointing to your ConfigMgr Content Source.
For Detection Method, I used a registry setting. Each time it updates, I only have to change the Version Value, which makes it quite easy to update to the new version.
That should do it.
Happy Deployments!
Hey thanks for this, it worked pretty well. I did have one issue though, when uninstalling I received an error with a code of 0x87D00325, though it did uninstall the application properly. The problem was that the Notepad++ uninstall.exe calls another process that actually handles the uninstall and then exits which causes the script to move on to the next step. This causes ConfigMgr to run the detection check before the uninstall process is actually completed. The solution was to add a sleep command to the uninstall script to pause it long enough for the uninstall to complete. You may need to adjust the sleep period based on your environment. Here's what my uninstall script looks like:
REM Notepad ++ UnInstall Script
taskkill /F /IM notepad++*
REM Remove old Updater Folder (Created during last install)
rmdir "C:\Program Files (x86)\Notepad++\updaterdisable" /S /Q
REM Run Notepad++ Installer File Silently
"C:\Program Files (x86)\Notepad++\uninstall.exe" /S
REM Pause for a few seconds to allow the uninstaller to complete and ensure correct uninstall detection by ConfigMgr
sleep 5
REM Remove old Updater Folder (Created during last install)
rmdir "C:\Program Files (x86)\Notepad++" /S /Q