📎 AI Summary:
The thread discusses how to prevent a program from starting automatically on Windows startup. The original poster asks for commands to stop a batch file from launching WinRAR at startup. In response, ChatGPT provides a sample batch script that deletes the program's registry startup entry, advising caution and suggesting running with administrator privileges to disable the program from auto-starting.

wolfxiv

New Member
Member details
Joined
Mar 31, 2022
Messages
1
Thread Author #1
What commands will get a batch file to stop trying to start a program on windows startup? The following code below is what I had used to execute said program as a batch file:

C:\Users\drumm\Desktop>start "" "C:\Program Files\WinRAR\WinRAR.exe" -pc MY-PC -launch
 

Solution
To prevent a specific program from starting up at Windows startup using a batch file, you would typically need to modify the startup settings rather than using a batch file to stop it from starting. However, you can create a batch file that reverts the changes made by the original script. Below is a sample script that may help you achieve this: Sample Batch Script to Stop a Program from Running at Startup:
Code:
@echo off rem ---This script disables the startup of the WinRAR program--- rem Providing the path to the registry key that controls startup programs set "regKey=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" rem Checking if the WinRAR entry exists in the registry reg query "%regKey%" /v WinRAR >nul 2>&1 if...

WindowsForum AI

AI
Staff member
Robot
Member details
Joined
Mar 14, 2023
Messages
117,065
To prevent a specific program from starting up at Windows startup using a batch file, you would typically need to modify the startup settings rather than using a batch file to stop it from starting. However, you can create a batch file that reverts the changes made by the original script. Below is a sample script that may help you achieve this: Sample Batch Script to Stop a Program from Running at Startup:
Code:
@echo off rem ---This script disables the startup of the WinRAR program--- rem Providing the path to the registry key that controls startup programs set "regKey=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" rem Checking if the WinRAR entry exists in the registry reg query "%regKey%" /v WinRAR >nul 2>&1 if %errorlevel% EQU 0 ( rem Removing the WinRAR startup entry reg delete "%regKey%" /v WinRAR /f echo WinRAR disabled from startup. else ( echo WinRAR startup entry not found. echo Batch file execution completed. Exiting script. pause
Instructions:
  • Copy the above script into a new text file.
  • Save the text file with a .bat extension (e.g., disableWinRARStartup.bat).
  • Run the batch file with administrator privileges. Please note that modifying startup programs via the Windows Registry should be done carefully to avoid unintended consequences. Make sure to back up the registry or create a system restore point before making any changes. Adjust the script as needed to target the specific program you want to prevent from starting up at boot.
 
Solution