How to silently uninstall notepad++

jacobccjude 445 Reputation points
2023-11-19T16:44:35.5033333+00:00

Hello,

We want to use the .bat script to uninstall the notepad++ on all our user computers silently. Can we deploy the script from SCCM to do this? Please help.

Microsoft Security | Intune | Application management
Microsoft Security | Intune | Configuration Manager | Application
0 comments No comments
{count} votes

Accepted answer
  1. Simon Ren-MSFT 40,346 Reputation points Microsoft External Staff
    2023-11-20T02:12:40.56+00:00

    Hi,

    Thank you for posting in Microsoft Q&A forum.

    Yes, you can place your .bat script in a folder, create a package pointing to this folder, create a program that runs the script, and deploy. Follow the steps below to deploy the batch file onto systems as you create for standard package.

    Step 1) Place the batch file onto a folder (shared folder)

    Step 2) Create a package and select the above folder as source files

    step 3) create a new program with command line batch filename.bat with proper settings as per the need.

    step 4) create an advertisement by selecting the above created package and program to required collection.

    Similar threads for your reference:

    How do I push a batch file using SCCM

    Running a batch file through SCCM

    The .bat script looks like below:

    @echo off
    set uninstallerPath=C:\Program Files (x86)\Notepad++\uninstall.exe
    if exist "%uninstallerPath%" (
    echo Uninstalling Notepad++...
    "%uninstallerPath%" /S
    timeout /t 5 > nul
    if not exist "%uninstallerPath%" (
    	echo Notepad++ uninstalled.
    ) else (
    	echo Notepad++ uninstall returned %errorlevel%
    )
    ) else (
    echo Notepad++ uninstaller not found.
    )
    

    Thanks for your time. Have a nice day!

    Best regards,

    Simon


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.