The Funelephant Forums!

You are not logged in.

Announcement

The Forums are currently Read-Only except for Mods & admin. These forums are closing down, but don't worry! We created a new forum, with more features! They are almost ready. We know it's hard to transition, but it's for the best! :D New Forums are here!

Adverts

Adverts

#1 Monday, July 2, 2012 13:48:31

daniel_j
From: Adelaide, Australia
Registered: Monday, July 2, 2012
Posts: 303
FunCoinz: 256
Bank: 50
Reputation :   
Website

Batch!?!

:D quite possibly the most unpopular language out there, but I enjoy it, and am wondering who even knows what it is and how to use it!
I started batch scripting at the age of 5 (?) I was using Windows 95 and explored editing autoexec.bat haha.. good times!
Thanks
Dan Jones


For all those wondering why, why?

Offline

 

Monday, July 2, 2012 13:48:31

AdBot
Advertisements

#2 Monday, July 2, 2012 13:59:44

funelephant
Registered: Tuesday, April 10, 2012
Posts: 1114
FunCoinz: 468
Bank: 462
Reputation :   

Re: Batch!?!

I've never heard of this programming language :P
How does it work?


We found this tube of glue stuck to your... uh... anyways, you can only use glue sticks now.
http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/90000/3000/900/93946/93946.strip.zoom.gif

Offline

 

#3 Monday, July 2, 2012 14:05:15

mythbusteranimator
From: Hiding from the FBI.
Registered: Monday, June 11, 2012
Posts: 660
FunCoinz: 547
Bank: 28
Reputation :   
Website

Re: Batch!?!

funelephant wrote:

I've never heard of this programming language :P
How does it work?


http://i45.tinypic.com/2zspqas.png

Offline

 

#4 Monday, July 2, 2012 14:08:35

daniel_j
From: Adelaide, Australia
Registered: Monday, July 2, 2012
Posts: 303
FunCoinz: 256
Bank: 50
Reputation :   
Website

Re: Batch!?!

Well, batch is a dedicated windows language, it was used in the file autoexec.bat. batch is very important if you use windows..
Here is an example batch script:

Code:

@echo off
cls
title Dan's Registry Editor
color 0a

:topofmenu
cls
echo.
echo    This script will allow the addition or removal of certain system option.
echo.                                
echo      #~....Please enter either (enable or disable) or, enter index....~#
echo.
echo                  #~ Enable will allow you to use the feature ~#
echo.
echo                     #~ Disable will disable the feature ~#
set /p select=
if "%select%" == "enable" goto remove2
if "%select%" == "disable" goto add2
if "%select%" == "index" goto index
cls
goto topofmenu

:add2
cls
echo                     #~ This script will DISABLE features ~#
echo.
echo     ######################################################################
echo     #                                                                    #
echo     #                 Please enter one of the following:                 #
echo     #                                                                    #
echo     #                    1= Disable Shutdown Selection                   #
echo     #                                                                    #
echo     #                    2= Disable Drive Selection                      #
echo     #                                                                    #
echo     #                    3= Restrict Run (DANGEROUS)                     #
echo     #                                                                    #
echo     #                    4= No Control Panel                             #
echo     #                                                                    #
echo     #                    5= No Desktop (No Icons)                        #
echo     #                                                                    #
echo     #                    6= Disable Wallpaper Change                     #
echo     #                                                                    #
echo     #                    7= Disable Theme Change                         #
echo     #                                                                    #
echo     #                    8= Disable Run                                  #
echo     #                                                                    #
echo     #                    Index= Return to index                          #
echo     #                                                                    #
echo     ######################################################################
echo.
echo.
set /p menu=Selecton:
if "%menu%" == "1" goto disableshutdown
if "%menu%" == "2" goto disabledrive
if "%menu%" == "3" goto restrictrun
if "%menu%" == "4" goto nocpl
if "%menu%" == "5" goto nodesktop
if "%menu%" == "6" goto nowallc
if "%menu%" == "7" goto themechangeno
if "%menu%" == "8" goto norun
if "%menu%" == "index" goto
cls
echo "%menu%" is not a selection, try again....
ping localhost -n 5 >null
goto add





:remove2
cls
echo                      #~ This script will Enable Features ~#
echo.
echo     ######################################################################
echo     #                                                                    #
echo     #                 Please enter one of the following:                 #
echo     #                                                                    #
echo     #                    1= Enable Shutdown Selection                    #
echo     #                                                                    #
echo     #                    2= Enable Drive Selection                       #
echo     #                                                                    #
echo     #                    3= Allow application execution                  #
echo     #                                                                    #
echo     #                    4= Add Control Panel                            #
echo     #                                                                    #
echo     #                    5= Add Desktop (Show Icons)                     #
echo     #                                                                    #
echo     #                    6= Enable Wallpaper Change                      #
echo     #                                                                    #
echo     #                    7= Enable Theme Change                          #
echo     #                                                                    #
echo     #                    8= Enable Run                                   #
echo     #                                                                    #
echo     #                    Index= Return to index                          #
echo     #                                                                    #
echo     ######################################################################
echo.
echo.
set /p menu=Selecton:
if "%menu%" == "1" goto enableshutdown
if "%menu%" == "2" goto enabledrives
if "%menu%" == "3" goto restrictrunoff
if "%menu%" == "4" goto cplon
if "%menu%" == "5" goto desktopon
if "%menu%" == "6" goto wallcon
if "%menu%" == "7" goto themestabon
if "%menu%" ==  "8" goto norun2
if "%menu%" == "index" goto
cls
echo "%menu%" is not a selection, try again....
ping localhost -n 5 >null
goto remove2





:disableshutdown
cls
echo.
echo Disabling Shutdown Button....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoClose /t "REG_DWORD" /d "1" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu

:disabledrive
cls
echo.
echo Disabling Drive Selection....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDrives /t "REG_DWORD" /d "67108863" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu

:restrictrun
cls
echo.
echo Enabling Restrict Run....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v RestrictRun /t "REG_DWORD" /d "1" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu





:nocpl
cls
echo.
echo Disabling Control Panel....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoControlPanel /t "REG_DWORD" /d "1" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu

:nodesktop
cls
echo.
echo Disabling Desktop....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDesktop /t "REG_DWORD" /d "1" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu


:nowallc
cls
echo.
echo Disabling Wallpaper Change....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop" /v NoChangingWallpaper /t "REG_DWORD" /d "1" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu


:themechangeno
cls
echo.
echo Disabling Themes Tab....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoThemesTab /t "REG_DWORD" /d "1" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu



rem _______________________________________________________________________________________________________________





:enableshutdown
cls
echo.
echo Enabling Shutdown Button....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoClose /t "REG_DWORD" /d "0" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu

:enabledrives
cls
echo.
echo Enabling Drive Selection....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDrives /t "REG_DWORD" /d "0" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu

:restrictrunoff
cls
echo.
echo Turning restrict run Off....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v RestrictRun /t "REG_DWORD" /d "0" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu





:cplon
cls
echo.
echo Enabling Control Panel....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoControlPanel /t "REG_DWORD" /d "0" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu

:desktopon
cls
echo.
echo Enabling Desktop....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDesktop /t "REG_DWORD" /d "0" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu


:wallcon
cls
echo.
echo Enabling Wallpaper Change....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop" /v NoChangingWallpaper /t "REG_DWORD" /d "0" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu


:themestabon
cls
echo.
echo Enabling Themes Tab....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoThemesTab /t "REG_DWORD" /d "0" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu


:norun
cls
echo.
echo Disabling Run (WINKEY+R)....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoRun /t "REG_DWORD" /d "1" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu

:norun2
cls
echo.
echo Enabling Run (WINKEY+R)....
ping localhost -n 5 >null
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoRun  /t "REG_DWORD" /d "0" /f
cls
echo.
taskkill /f /im explorer.exe
start explorer.exe
cls
echo Command Successfull!
ping localhost -n 5 >null
goto topofmenu

This script is a very powerful code, and it should not be used unless you know what you are doing. It will modify your registry to do things your computer was not intended to do..
This is one of the many ways batch can be used!
Batch is also used to launch your computer, if you have any experience with the command prompt, this is exactly what that is, except you enter commands in notepad :D

Last edited by daniel_j (Monday, July 2, 2012 14:10:26)


For all those wondering why, why?

Offline

 

#5 Monday, July 2, 2012 14:12:14

funelephant
Registered: Tuesday, April 10, 2012
Posts: 1114
FunCoinz: 468
Bank: 462
Reputation :   

Re: Batch!?!

Oh, I never knew that. :cool:


We found this tube of glue stuck to your... uh... anyways, you can only use glue sticks now.
http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/90000/3000/900/93946/93946.strip.zoom.gif

Offline

 

#6 Monday, July 2, 2012 14:13:27

daniel_j
From: Adelaide, Australia
Registered: Monday, July 2, 2012
Posts: 303
FunCoinz: 256
Bank: 50
Reputation :   
Website

Re: Batch!?!

Yeah, it is very powerdul, and you get full access to a computer, other languages like C# or C++ doesn't have acces to this stuff!


For all those wondering why, why?

Offline

 

#7 Monday, July 2, 2012 14:14:44

funelephant
Registered: Tuesday, April 10, 2012
Posts: 1114
FunCoinz: 468
Bank: 462
Reputation :   

Re: Batch!?!

daniel_j wrote:

Yeah, it is very powerdul, and you get full access to a computer, other languages like C# or C++ doesn't have acces to this stuff!

Now I'm scared to use it so my computer doesn't blow up. ._.


We found this tube of glue stuck to your... uh... anyways, you can only use glue sticks now.
http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/90000/3000/900/93946/93946.strip.zoom.gif

Offline

 

#8 Monday, July 2, 2012 14:16:08

daniel_j
From: Adelaide, Australia
Registered: Monday, July 2, 2012
Posts: 303
FunCoinz: 256
Bank: 50
Reputation :   
Website

Re: Batch!?!

Haha, I promise it cannot blow up your computer xD the above script can only cause damage if you edit it! :P


For all those wondering why, why?

Offline

 

#9 Monday, July 2, 2012 14:17:31

mythbusteranimator
From: Hiding from the FBI.
Registered: Monday, June 11, 2012
Posts: 660
FunCoinz: 547
Bank: 28
Reputation :   
Website

Re: Batch!?!

So I could accidentally give somebody else access to my computer? I'll stick to Scratch. :P


http://i45.tinypic.com/2zspqas.png

Offline

 

#10 Monday, July 2, 2012 14:18:58

funelephant
Registered: Tuesday, April 10, 2012
Posts: 1114
FunCoinz: 468
Bank: 462
Reputation :   

Re: Batch!?!

daniel_j wrote:

Haha, I promise it cannot blow up your computer xD the above script can only cause damage if you edit it! :P

:P
I still don't wanna screw up my laptop :P


We found this tube of glue stuck to your... uh... anyways, you can only use glue sticks now.
http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/90000/3000/900/93946/93946.strip.zoom.gif

Offline

 

#11 Monday, July 2, 2012 14:24:37

mythbusteranimator
From: Hiding from the FBI.
Registered: Monday, June 11, 2012
Posts: 660
FunCoinz: 547
Bank: 28
Reputation :   
Website

Re: Batch!?!

funelephant wrote:

daniel_j wrote:

Haha, I promise it cannot blow up your computer xD the above script can only cause damage if you edit it! :P

:P
I still don't wanna screw up my laptop :P

I'm on my 3DS right now.


http://i45.tinypic.com/2zspqas.png

Offline

 

#12 Monday, July 2, 2012 14:29:07

funelephant
Registered: Tuesday, April 10, 2012
Posts: 1114
FunCoinz: 468
Bank: 462
Reputation :   

Re: Batch!?!

mythbusteranimator wrote:

funelephant wrote:

daniel_j wrote:

Haha, I promise it cannot blow up your computer xD the above script can only cause damage if you edit it! :P

:P
I still don't wanna screw up my laptop :P

I'm on my 3DS right now.

That would be cool if you could make the forums 3D


We found this tube of glue stuck to your... uh... anyways, you can only use glue sticks now.
http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/90000/3000/900/93946/93946.strip.zoom.gif

Offline

 

#13 Monday, July 2, 2012 14:35:02

mythbusteranimator
From: Hiding from the FBI.
Registered: Monday, June 11, 2012
Posts: 660
FunCoinz: 547
Bank: 28
Reputation :   
Website

Re: Batch!?!

Nah, the browser isn't 3D. :(


http://i45.tinypic.com/2zspqas.png

Offline

 

#14 Monday, July 2, 2012 15:04:56

funelephant
Registered: Tuesday, April 10, 2012
Posts: 1114
FunCoinz: 468
Bank: 462
Reputation :   

Re: Batch!?!

mythbusteranimator wrote:

Nah, the browser isn't 3D. :(

:( It would be cool though.


We found this tube of glue stuck to your... uh... anyways, you can only use glue sticks now.
http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/90000/3000/900/93946/93946.strip.zoom.gif

Offline

 

#15 Monday, July 2, 2012 15:26:37

mythbusteranimator
From: Hiding from the FBI.
Registered: Monday, June 11, 2012
Posts: 660
FunCoinz: 547
Bank: 28
Reputation :   
Website

Re: Batch!?!

funelephant wrote:

mythbusteranimator wrote:

Nah, the browser isn't 3D. :(

:( It would be cool though.

+10


http://i45.tinypic.com/2zspqas.png

Offline

 

#16 Monday, July 2, 2012 15:56:36

daniel_j
From: Adelaide, Australia
Registered: Monday, July 2, 2012
Posts: 303
FunCoinz: 256
Bank: 50
Reputation :   
Website

Re: Batch!?!

mythbusteranimator wrote:

So I could accidentally give somebody else access to my computer? I'll stick to Scratch. :P

Nah, it is impossible to give access to a computer through batch scripting, however I never said that for vbs. xD


For all those wondering why, why?

Offline

 

#17 Monday, July 2, 2012 16:08:13

daniel_j
From: Adelaide, Australia
Registered: Monday, July 2, 2012
Posts: 303
FunCoinz: 256
Bank: 50
Reputation :   
Website

Re: Batch!?!

funelephant wrote:

daniel_j wrote:

Haha, I promise it cannot blow up your computer xD the above script can only cause damage if you edit it! :P

:P
I still don't wanna screw up my laptop :P

Nah, it is impossible to screw up your laptop through batch scripting. This batch script was made intentionally to make simple things difficult, and to make hard things harder. This script involves the use of command based regediting to change system properties ( not damaging properties). The kind of registry that this will change is the simple GUI related stuff, such as a logon message, or VBS message box. This script can also change your system clocks time (insted of AM or PM you could enter Ante Meridiem or Post Meridiem) The corrosponding text would be used. Sorry if this does not make sense, it is 1:30AM and I am dead tired... Off to bed now!
Thanks
Dan Jones


For all those wondering why, why?

Offline

 

#18 Monday, July 2, 2012 19:29:54

mythbusteranimator
From: Hiding from the FBI.
Registered: Monday, June 11, 2012
Posts: 660
FunCoinz: 547
Bank: 28
Reputation :   
Website

Re: Batch!?!

daniel_j wrote:

funelephant wrote:

daniel_j wrote:

Haha, I promise it cannot blow up your computer xD the above script can only cause damage if you edit it! :P

:P
I still don't wanna screw up my laptop :P

Nah, it is impossible to screw up your laptop through batch scripting. This batch script was made intentionally to make simple things difficult, and to make hard things harder. This script involves the use of command based regediting to change system properties ( not damaging properties). The kind of registry that this will change is the simple GUI related stuff, such as a logon message, or VBS message box. This script can also change your system clocks time (insted of AM or PM you could enter Ante Meridiem or Post Meridiem) The corrosponding text would be used. Sorry if this does not make sense, it is 1:30AM and I am dead tired... Off to bed now!
Thanks
Dan Jones

I usually spend 2 hours after going to bed at 10 PM on my 3DS browser on forums. Mainly the TBGs.


http://i45.tinypic.com/2zspqas.png

Offline

 

#19 Tuesday, July 3, 2012 02:17:31

daniel_j
From: Adelaide, Australia
Registered: Monday, July 2, 2012
Posts: 303
FunCoinz: 256
Bank: 50
Reputation :   
Website

Re: Batch!?!

Yeah, forums can be quite addictive xD


For all those wondering why, why?

Offline

 

#20 Friday, July 6, 2012 02:47:22

Mokat
From: Missouri
Registered: Monday, June 11, 2012
Posts: 221
FunCoinz: 142
Bank: 0
Reputation :   
Website

Re: Batch!?!

daniel_j wrote:

Yeah, forums can be quite addictive xD

you can say that again


Don't tell me to get a life-- Everyone knows that's never gonna happen. :P

Offline

 

#21 Friday, July 6, 2012 11:23:50

funelephant
Registered: Tuesday, April 10, 2012
Posts: 1114
FunCoinz: 468
Bank: 462
Reputation :   

Re: Batch!?!

Mokat wrote:

daniel_j wrote:

Yeah, forums can be quite addictive xD

you can say that again


We found this tube of glue stuck to your... uh... anyways, you can only use glue sticks now.
http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/90000/3000/900/93946/93946.strip.zoom.gif

Offline

 

#22 Friday, July 6, 2012 12:28:49

mythbusteranimator
From: Hiding from the FBI.
Registered: Monday, June 11, 2012
Posts: 660
FunCoinz: 547
Bank: 28
Reputation :   
Website

Re: Batch!?!

funelephant wrote:

Mokat wrote:

daniel_j wrote:

Yeah, forums can be quite addictive xD

you can say that again

+50. :P

I posted 1500 times on the Scratch TBGs in the last two weeks. :P


http://i45.tinypic.com/2zspqas.png

Offline

 

#23 Friday, July 6, 2012 13:01:16

daniel_j
From: Adelaide, Australia
Registered: Monday, July 2, 2012
Posts: 303
FunCoinz: 256
Bank: 50
Reputation :   
Website

Re: Batch!?!

I find myself refreshing this page about 10 times a minute lol.
Talking about this, new topic !!


For all those wondering why, why?

Offline

 

#24 Friday, July 6, 2012 17:09:47

funelephant
Registered: Tuesday, April 10, 2012
Posts: 1114
FunCoinz: 468
Bank: 462
Reputation :   

Re: Batch!?!

daniel_j wrote:

I find myself refreshing this page about 10 times a minute lol.
Talking about this, new topic !!

:lol:


We found this tube of glue stuck to your... uh... anyways, you can only use glue sticks now.
http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/90000/3000/900/93946/93946.strip.zoom.gif

Offline

 

#25 Friday, July 6, 2012 21:27:50

Piper
Member
From: Piping - Uniting
Registered: Friday, July 6, 2012
Posts: 21
FunCoinz: 23
Bank: 0
Reputation :   

Re: Batch!?!

Batch-makes interesting files
Batch-many don't fall for its wiles
Save your work as .bat
And you may find that


Good morning, dear friends
My post has come to some ends

Offline

 

Adverts

Board footer

Powered by FluxBB
Hosted by PunBB-Hosting