Computer Hope

Microsoft => Microsoft DOS => Topic started by: xcharge50 on February 04, 2009, 06:28:09 PM

Title: What is the most useless or funniness batch file?
Post by: xcharge50 on February 04, 2009, 06:28:09 PM
For some reason (or stupidity) some friend of mine (including me) make a contests  to make a stupid batch. (College live =P). I wonder if is possible to make a bsod (Blue screen of death) in batch without harming a computer (I don't want smoke =O). If not (or if you have better idea) can I have some example of useless or stupid 1? (no del *.* /q >void (I say harmless) or shutdown (is a classic) plx). Thx an help me win 5 buck plx
Title: Re: What is the most useless or funniness batch file?
Post by: Geek-9pm on February 04, 2009, 06:36:15 PM
You may be onto an important discovery. He is a poor attempt.
[Llink Removed, although I don't know what it does. Just for safety]
Title: Re: What is the most useless or funniness batch file?
Post by: xcharge50 on February 04, 2009, 06:47:47 PM
actually rem is kinda useful in a batch editor! You can add comment in you batch without break it. Anyway thx for you try!

maybe a batch that will open a redirect url of this website : [Llink Removed]

p.s. This link will not harm you computer but maybe you braincell =)
Title: Re: What is the most useless or funniness batch file?
Post by: Dusty on February 04, 2009, 11:55:04 PM
Please read the CH rules http://www.computerhope.com/forum/index.php/topic,58736.0.html

Here is an extract from "a short list of what Computer Hope and the forum members will not help with."

Quote
If you’re looking for help with getting revenge on someone else and/or hacking into a program or service look elsewhere.  This also includes supposedly "harmless" pranks.  This is not what Computer Hope was designed for.

Title: Re: What is the most useless or funniness batch file?
Post by: Carbon Dudeoxide on February 05, 2009, 12:16:08 AM
Quote
I wonder if is possible to make a bsod
Why??
Title: Re: What is the most useless or funniness batch file?
Post by: xcharge50 on February 05, 2009, 05:50:11 AM
Actually I just realize what I ask was fishy  :-[ (but I have no bad intention) but in a way everyone can say that. Anyway just to tell I win with a: help /? in a small batch file with choice, ect....

Im kinda new in here so I learning slowly the rule P.S. My link was a rick roll an maybe is better to have been removed
Title: Re: What is the most useless or funniness batch file?
Post by: Carbon Dudeoxide on February 05, 2009, 07:03:37 AM
Im kinda new in here so I learning slowly the rule P.S. My link was a rick roll an maybe is better to have been removed
Thanks to a new script I wrote a few days before and added it to my touch-pad FN commands, I forcefully killed firefox after opening that page....which is why I removed it.
Title: Re: What is the most useless or funniness batch file?
Post by: Biker Steve on February 05, 2009, 08:46:01 AM

My vote goes to a MS DOS batch file that contains only one @ .

Title: Re: What is the most useless or funniness batch file?
Post by: BC_Programmer on February 05, 2009, 10:08:09 AM
You may be onto an important discovery.

Please tell me there was sarcasm there!




Batch script itself cannot cause a BSOD.



I have gotten BSODs in windows 98 in my VB apps... but I later discovered that my installation of ADO was corrupted.
Title: Re: What is the most useless or funniness batch file?
Post by: Geek-9pm on February 05, 2009, 01:43:53 PM
My stuff got zapped. Oh Oh. Now I am on the blacklist?
Here is a picture, PN, of what happens if a batch program calls itself. The program is called 'self.bat' and has a REM and the command 'call self' and it runs until you get this:

(http://geek9pm.com/call_self.png)
Title: Re: What is the most useless or funniness batch file?
Post by: Carbon Dudeoxide on February 05, 2009, 06:00:28 PM
My stuff got zapped. Oh Oh. Now I am on the blacklist?
No, not at all. I zapped it because, considering where the topic went.....
Title: Re: What is the most useless or funniness batch file?
Post by: Geek-9pm on February 05, 2009, 07:57:35 PM
Quote
Please tell me there was sarcasm there
Quote
I zapped it because, considering where the topic went

Yes, some sarcazm, but of some academic value in learning more about the command line thig. Somebody said that a batch file can not do BSOD.
That maybe generally true. I posted the screen shot of what pointless recursion does. The command line will not stop you from trying it, but it did stop the process after 1240 iterations.  Ands it did it fast. I have 1GB and XP Pro SP3 on a 2.8 P4 CPU.  But I am surprized that it only allowed some 1200 recursions. Is that not a limiting factor.
 sould hope for more like 10,000 iterations. Only 1240 really is pointless. If you wanted to discover a new prime number in a batch file, this would not ve near enough!

So them,  does writing a pointless batch file have no value at all? Is there no value in doing this? I think is more entertaining that the word game that has been going on forever. But, just IMO.
Title: Re: What is the most useless or funniness batch file?
Post by: BC_Programmer on February 05, 2009, 09:12:32 PM
All recursive algorithms have an iterative solution.
Title: Re: What is the most useless or funniness batch file?
Post by: Geek-9pm on February 05, 2009, 09:21:08 PM
Quote
All recursive algorithms have an iterative solution.

All general statements are false, including this one.
Title: Re: What is the most useless or funniness batch file?
Post by: BC_Programmer on February 05, 2009, 09:22:17 PM
can you name an exception then?
Title: Re: What is the most useless or funniness batch file?
Post by: Geek-9pm on February 05, 2009, 09:28:24 PM
Find the best  square root of 2 out to 10^100 significant digits. And see if you can do that with only iteration and not recursion. I am not sure.
But, in any case, I would not try it in a batch file. Maybe you would.
Title: Re: What is the most useless or funniness batch file?
Post by: BC_Programmer on February 05, 2009, 09:36:30 PM
newtons method of square root approximation was originally an iterative algorithm.


The iterative versions of a recursive solution are slightly slower but less memory intensive, and additionally a major PITA to code at all. a recursive solution is a lot easier to understand and read.


And then you get messy stuff like mutual recursion between four or five class modules- or recursion within them... for example, my expression evaluation library has a "CParser" main object. the stack item for a function has an array of other CParser objects that represent each argument. It would be extremely difficult to make a "iterative" type of solution for this, so really I found an exception myself.

I guess it depends on the complexity of the algorithm more then the complexity of the recursion used to implement it.
Title: Re: What is the most useless or funniness batch file?
Post by: xcharge50 on February 05, 2009, 09:37:52 PM

So them,  does writing a pointless batch file have no value at all? Is there no value in doing this? I think is more entertaining that the word game that has been going on forever. But, just IMO.


I guest that's my current problem =) Making batch for entertainment! But this recursions is interesting!
p.s. Batch file is better than solitaire
Title: Re: What is the most useless or funniness batch file?
Post by: Geek-9pm on February 05, 2009, 11:55:29 PM
Quote
p.s. Batch file is better than solitaire
My favorite is FreeCell. I find solitaire
much to difficult for my small bird brain. I average about 5 minuets on free cell and then 10 minutes on this forum.

BC  You are right. And I never did like recursion, but you sometimes have to plan for it if you program takes a strange turn and later somebody says 'now can you just add this little feature'. If you had allowed for possible recursion, you can do it. Some programming languages or implementations make it have to use dynamic allocation of memory, which makes recursion hard to do. I made the mistake of use global variables  in a simple X.25 telecommunication program and then later the boss said it also had to be a fast mini database that would index the clients notes! Awwak!  :o

Title: Re: What is the most useless or funniness batch file?
Post by: BC_Programmer on February 06, 2009, 09:48:21 AM
I thought to split this recursion,iteration, and so forth discussion here:

http://www.computerhope.com/forum/index.php/topic,76323.new.html#new

after all- these aren't useless :)