Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 08-06-2009, 06:07 PM   #1
Daemon Poster
 
Join Date: Oct 2006
Posts: 684
Default speed up code

This is my code that i'm planing on putting in my startup folder to speed up the internet but when i click on it, it doesn't do anything
Code:
@ECHO OFF
@ECHO ipconfig /renew
@ECHO ipconfig /flushdns
@ECHO del C:/WINDOWS/Prefetch/
@ECHO del %%UserProfile%%/My Recent Documents/
@ECHO netsh int ip reset netsh.txt
__________________

__________________
AMD 64 x2 5600+|Asus m3a|4GB RAM|Nvidia Geforce 9500 gt|320 GB Seagate Hard Drive
ringtemek is offline   Reply With Quote
Old 08-06-2009, 06:21 PM   #2
j03
~~~~~~~~
 
Join Date: Jan 2005
Location: Wales
Posts: 5,556
Send a message via MSN to j03
Default Re: speed up code

It's because you've got @echo at the beginnging of each line, which tells it to print (display on the screen) everything on that line... You only need to have "@ECHO OFF" on the first line to silence the output of any command that you issue through out the script.

This should fix it:
Code:
@ECHO OFF
ipconfig /renew
ipconfig /flushdns
del C:/WINDOWS/Prefetch/
del %%UserProfile%%/My Recent Documents/
netsh int ip reset netsh.txt
__________________

j03 is offline   Reply With Quote
Old 08-06-2009, 06:30 PM   #3
Daemon Poster
 
Join Date: Oct 2006
Posts: 684
Default Re: speed up code

it still didn't work
__________________
AMD 64 x2 5600+|Asus m3a|4GB RAM|Nvidia Geforce 9500 gt|320 GB Seagate Hard Drive
ringtemek is offline   Reply With Quote
Old 08-07-2009, 01:16 PM   #4
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: speed up code

What's the file called and where is it? If you put the above in a file called "something.bat" and drag it into your startup folder then it should run without an issue. Have you double checked that the batch file itself is ok (create it and then run it to check it does what you want?)
berry120 is offline   Reply With Quote
Old 08-07-2009, 01:52 PM   #5
j03
~~~~~~~~
 
Join Date: Jan 2005
Location: Wales
Posts: 5,556
Send a message via MSN to j03
Default Re: speed up code

Try:

Code:
@ECHO OFF
ipconfig /renew
ipconfig /flushdns
ECHO Y | del "C:/WINDOWS/Prefetch/"
ECHO Y | del "%%UserProfile%%/My Recent Documents/"
netsh int ip reset netsh.txt
j03 is offline   Reply With Quote
Old 08-07-2009, 03:51 PM   #6
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: speed up code

Ah yes. "del" needs some form of confirmation unless you tell it otherwise (forgetful day today!) So either the above:
Quote:
ECHO Y | del "C:/WINDOWS/Prefetch/"
or...
Quote:
del /q "C:/WINDOWS/Prefetch/"
should be fine
berry120 is offline   Reply With Quote
Old 08-08-2009, 07:28 AM   #7
Beta Member
 
Join Date: Aug 2009
Posts: 1
Default Re: speed up code

hi
thanks for the valuable information
__________________

kostiakot is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 03:30 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0