Relative Content

Tag Archive for windowspowershellbatch-file

Environment Path Variables are deleting while updating python path using batch (.bat) File

@echo off SETLOCAL ENABLEDELAYEDEXPANSION :: Variables SET DOWNLOAD_URL=https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe SET PYTHON_INSTALLER=python-3.12.0-amd64.exe SET PYTHON_PATH=%LOCALAPPDATA%ProgramsPythonPython312 SET SCRIPTS_PATH=%PYTHON_PATH%Scripts :: Step 1: Download Python installer if it doesn’t exist IF EXIST “%~dp0%PYTHON_INSTALLER%” ( echo Python installer already exists. ) ELSE ( echo Downloading Python installer from %DOWNLOAD_URL%… powershell -Command “Invoke-WebRequest -Uri ‘%DOWNLOAD_URL%’ -OutFile ‘%~dp0%PYTHON_INSTALLER%'” IF NOT EXIST “%~dp0%PYTHON_INSTALLER%” ( echo […]

Environment Path Variables are deleting while updating python path using batch (.bat) File

@echo off SETLOCAL ENABLEDELAYEDEXPANSION :: Variables SET DOWNLOAD_URL=https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe SET PYTHON_INSTALLER=python-3.12.0-amd64.exe SET PYTHON_PATH=%LOCALAPPDATA%ProgramsPythonPython312 SET SCRIPTS_PATH=%PYTHON_PATH%Scripts :: Step 1: Download Python installer if it doesn’t exist IF EXIST “%~dp0%PYTHON_INSTALLER%” ( echo Python installer already exists. ) ELSE ( echo Downloading Python installer from %DOWNLOAD_URL%… powershell -Command “Invoke-WebRequest -Uri ‘%DOWNLOAD_URL%’ -OutFile ‘%~dp0%PYTHON_INSTALLER%'” IF NOT EXIST “%~dp0%PYTHON_INSTALLER%” ( echo […]

Environment Path Variables are deleting while updating python path using batch (.bat) File

@echo off SETLOCAL ENABLEDELAYEDEXPANSION :: Variables SET DOWNLOAD_URL=https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe SET PYTHON_INSTALLER=python-3.12.0-amd64.exe SET PYTHON_PATH=%LOCALAPPDATA%ProgramsPythonPython312 SET SCRIPTS_PATH=%PYTHON_PATH%Scripts :: Step 1: Download Python installer if it doesn’t exist IF EXIST “%~dp0%PYTHON_INSTALLER%” ( echo Python installer already exists. ) ELSE ( echo Downloading Python installer from %DOWNLOAD_URL%… powershell -Command “Invoke-WebRequest -Uri ‘%DOWNLOAD_URL%’ -OutFile ‘%~dp0%PYTHON_INSTALLER%'” IF NOT EXIST “%~dp0%PYTHON_INSTALLER%” ( echo […]

Windows Script | UploadImage to An Application

We are looking at options to mimic WhatsApp’s broadcast-list feature and came up with the below improved (from reverse engineering) version of the script to send a text message to a WhatsApp number and it does the job:

batch script should not prompt confirmation question

Unfortunately my time service is broken and I was not able to restore it. So I wrote a batch script which invokes a powershel script which starts the time service and put that inside the autostart foldert. Time Serive has been starting since then but unfortunately I got prompted everytime my computer boots. In additon both files are opened in editor. How can I possibly avoid this?