Hello friends...
If you are a beginner or new to batch file, this post will help you to create your first batch file with some fun.
Batch file is just a script file with single or series of commands to be execute. If you are familiar with some dos commands then you can explore many possibilities using batch file.
I have come across one requirement in plant that , plant operator should not be able to use computer other than for monitoring SCADA. So i have created one batch file by which explorer can be closed.
To create a new batch file, open notepad - write your windows command - Save it As anything.bat.
Note that you have to give extension : .bat
Yes, That's it. you have created your batch file.
Write down following command in notepad and save it as "close explorer.bat".
Taskkill /F /IM explorer.exe
Here, taskkill is a command to end one or more processes, /F specifies to terminate forcefully, /IM specifies the image name of the process and explorer.exe is our process to be terminate
Saved file will look like...
Now just double click on the file and see the magic.
Dont't worry. To get back to your original screen, press ALT+CTRL+DEL then go to task manager and in file menu go to Run and type what we have terminated. i.e. explorer.exe and press OK.
Similar way, you can carry out many tasks that you were doing in command prompt. Like checking Ping, changing IP address, Date of your system etc.
Hope you might have found this helpful to start with batch file. Write your comment if you have carried out something new with batch file.
Regards,
Bhargav.
If you are a beginner or new to batch file, this post will help you to create your first batch file with some fun.
Batch file is just a script file with single or series of commands to be execute. If you are familiar with some dos commands then you can explore many possibilities using batch file.
I have come across one requirement in plant that , plant operator should not be able to use computer other than for monitoring SCADA. So i have created one batch file by which explorer can be closed.
To create a new batch file, open notepad - write your windows command - Save it As anything.bat.
Note that you have to give extension : .bat
Yes, That's it. you have created your batch file.
Write down following command in notepad and save it as "close explorer.bat".
Taskkill /F /IM explorer.exe
Here, taskkill is a command to end one or more processes, /F specifies to terminate forcefully, /IM specifies the image name of the process and explorer.exe is our process to be terminate
Saved file will look like...
Now just double click on the file and see the magic.
Dont't worry. To get back to your original screen, press ALT+CTRL+DEL then go to task manager and in file menu go to Run and type what we have terminated. i.e. explorer.exe and press OK.
Similar way, you can carry out many tasks that you were doing in command prompt. Like checking Ping, changing IP address, Date of your system etc.
Hope you might have found this helpful to start with batch file. Write your comment if you have carried out something new with batch file.
Regards,
Bhargav.
No comments:
Post a Comment