DOS Coding Problem

For beginners, flames not allowed...(just by the staff :P)
Post Reply
User avatar
solidsnake
forum buddy
forum buddy
Posts: 16
Joined: 15 Sep 2008, 16:00
15

DOS Coding Problem

Post by solidsnake »

Well i wasn't sure whether this belongs to the Newbie Section or the Windows Section. But i decided since i am too nub to know. I will just dispatch it here.

Here is the problem i am trying to solve...

I want to make a little patch for a friend of mine so he can manually remove Autorun.inf Virus from his PC Drives, since he gets infected a lot. the other problem is that he doesn't regularly infect the same driver. So i wanted to make a patch for that... Just don't know where i went wrong.

Code: Select all

@ECHO OFF
ECHO Type your Drive name here:
Pause
1% dir
del/ah/f autorun.inf
copy con autorun.inf
ECHO Press Enter Please
pause
[autorun]
open=explorer.exep
[f6][enter]
Echo Patch done, If you want it to run again just open the File once more...

User avatar
floodhound2
∑lectronic counselor
∑lectronic counselor
Posts: 2117
Joined: 03 Sep 2006, 16:00
17
Location: 127.0.0.1
Contact:

Post by floodhound2 »

I may be wrong but Under

Code: Select all

copy con autorun.inf 
shouldn't you need a place to copy it to? :-k

User avatar
DNR
Digital Mercenary
Digital Mercenary
Posts: 6114
Joined: 24 Feb 2006, 17:00
18
Location: Michigan USA
Contact:

naw, get the AVP

Post by DNR »


Here is the problem i am trying to solve...

I want to make a little patch for a friend of mine so he can manually remove Autorun.inf Virus from his PC Drives, since he gets infected a lot.
you are better off getting him a nice free AV program, one that will protect against other viruses, trojans, and malware even (comodo.com). The autoupdate feature of AVP will protect your friend from future mutations of the autorun virus, as well as all the others.

DNR
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.

G-Brain
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 467
Joined: 08 Nov 2007, 17:00
16
Location: NL

Post by G-Brain »

Note that you can disable autorun. Google it.
I <3 MariaLara more than all of you

User avatar
DNR
Digital Mercenary
Digital Mercenary
Posts: 6114
Joined: 24 Feb 2006, 17:00
18
Location: Michigan USA
Contact:

Post by DNR »

g-brain has a point, if you are talking about the autorun.inf vuln, not a virus then here is a quick clip of how to disable autorun
How To Enable/Disable Autorun (Windows 95/98/Me)
1.Access the System Properties Dialog. Using Control Panel: My Computer: Properties or Explorer: My Computer: Properties.


2.Select the Device Manager tab.


3.Select the CD-ROM folder.


4.Select the entry for your CD-ROM drive.


5.Select Properties.


6.Select the Settings tab.


7.Turn on or off the Auto insert notification option.


8.Select OK.


9.Select OK

--------------------------------------------------------------------------------

How To Enable/Disable Autorun (Windows NT/2000)
1.Start RegEdit (regedt32.exe).


2.Go to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/Cdrom.


3.Edit the Autorun value to '1' to enable autorn, and '0' to disable autorun.


4.Close RegEdit

--------------------------------------------------------------------------------

How To Enable/Disable Autorun (Windows XP)
1.Open Windows Explorer by pressing the Windows + "e" key.


2.Right-click the desired CD-ROM and select Properties from the menu.


3.Select the AutoPlay tab.


4.Select each item from the pulldown list and for the Action to perform, select "Take no action" to disable autorun, or pick the apporpriate action to take if enabling autorun.


5.Select OK.
You can search google for registry tips on disabling autorun.inf, not just for CD or floppy, but pendrives too.

DNR
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.

User avatar
solidsnake
forum buddy
forum buddy
Posts: 16
Joined: 15 Sep 2008, 16:00
15

Post by solidsnake »

More than thanks to you guys...

The thing with antiviruses is that he is already using Kaspersky 2009 but it doesn't detect autorun as he says. Though as he tells me updates the program every day (since he is online all the time on a ADSL connection).

I will sure tell him about that disable method.

One thing. Why is it when i run that batch i posted it doesn't do anything.. it rather gives me an error that nothing is happening... Since the dir command didn't find any drive to "dir" though i gave him the name of my drive (say C: or D:).

Post Reply