Showing posts with label bat files. Show all posts
Showing posts with label bat files. Show all posts

Wednesday, June 2, 2021

Create a bat file to set path

 you may have to set path manually so many times due to various reasons. In a scenario like that best thing is to make a bat file and set path at once. below is simple sample bat file for that.

1. create notepad and save with content to PATH variable as below and save as "path.bat", file name can be any name as per requirement.

SET PATH=C:\Program Files\Java\jdk-12.0.1\bin;C:\Project\New2019-07-22\sw\apache\apache-maven-3.5.4\bin;



Tuesday, August 27, 2019

Automate: Create Remote Desktop connection

How to connect to remote machine automatically running a bat file in Windows.
This will ease your life.

below is the sample line

cmdkey /generic:"IP Address" /user:"UserName" /pass:"Password"
mstsc /v:"IP Address"
eg:

cmdkey /generic:111.111.111.111 /user:Domain\user.name /pass:password
mstsc /v:111.111.111.111