Ok guys any answers??

kenny504kenny504 Users Awaiting Email Confirmation Posts: 237 ■■□□□□□□□□
I'm in the process of constructing a batch file for a training session.

I usually just have my batch file copy the hal.dll to another location and then delete it from c:\windows\system32.

That way the students can troubleshoot a common problem that occurs when some malware attacks a system. Then either using an emergency disk or the recovery console or many other different methods we copy that system file back.

Here's the thing....

I want to construct a file that i will deploy to each workstations desktop and have them simply run it. It should do something like remove the ntldr, ntdetect.com and or the boot.ini and automatically restart the machine.

The restarting part and copying of these files i had success with but having them deleted automatically using a batch file and ofcourse the command prompt seems impossible. I noticed i had to manually go in the c: directory change a few attributes and then delete them.

Any tips on ways i can go about this to get a similiar effect.

Thanks Kenny.
There is no better than adversity, every defeat, every loss, every heartbreak contains its seed. Its own lesson on how to improve on your performance the next time.

Comments

  • sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    kenny504 wrote:
    I noticed i had to manually go in the c: directory change a few attributes and then delete them.

    Any tips on ways i can go about this to get a similiar effect.

    Thanks Kenny.

    You mean like using the attrib command?

    Displays or changes file attributes.

    ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename]
    [/S [/D]]

    + Sets an attribute.
    - Clears an attribute.
    R Read-only file attribute.
    A Archive file attribute.
    S System file attribute.
    H Hidden file attribute.
    [drive:][path][filename]
    Specifies a file or files for attrib to process.
    /S Processes matching files in the current folder
    and all subfolders.
    /D Processes folders as well.
    All things are possible, only believe.
  • JDMurrayJDMurray Admin Posts: 13,089 Admin
    This might be a bit of an overkill for what you are trying to do, but everyone who admins Windows machines should give Microsoft's Windows PowerShell a try. It has over 130 command line-driven tools (including ATTRIB ;) ) and a built-in scripting interface. I think it's worth having and learning.
  • kenny504kenny504 Users Awaiting Email Confirmation Posts: 237 ■■□□□□□□□□
    No.......the attrib command gives you errors when trying to edit system files attributes..I'll take a shot at powershell though.
    There is no better than adversity, every defeat, every loss, every heartbreak contains its seed. Its own lesson on how to improve on your performance the next time.
Sign In or Register to comment.