|
-
Aug 1st, 2000, 07:15 PM
#1
Thread Starter
Addicted Member
I can use the "KILL" comand to delete certain files...but it wont delete files with .exe
why is this?? because microsoft dont want people to have that power?
and if there is a way around how so?
Thanks
-
Aug 1st, 2000, 07:23 PM
#2
Fanatic Member
-
Aug 1st, 2000, 07:30 PM
#3
_______
<?>
Code:
Private Sub Form_Load()
'no problem to kill an exe file
Dim myFile As String
myFile = "C:\aaa\alarm.exe"
'maybe the file has attributes set to other
'To set back to normal (archive) attrib
SetAttr myFile, vbNormal
Kill myFile
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 1st, 2000, 07:40 PM
#4
Thread Starter
Addicted Member
Thanks all
Your method would have been my last resort HeSaidJoe..
Thanks again.
-
Aug 1st, 2000, 07:49 PM
#5
_______
<?>
Human nature, we always make things harder than they are!
Have fun.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 1st, 2000, 08:57 PM
#6
Sophtware, if a file is running. It cannot be deleted. Instead, it will give you an error. But I guess HeSaidJoe answered your question already. But it's good to know if you ever have the question on why an error comes up and the file won't delete.
-
Aug 1st, 2000, 10:12 PM
#7
Thread Starter
Addicted Member
Really?
If i file cant be erased when you try to delete it...
Then how do certain virus delete programs?
Is it coded to delete the program when it isnt in use?
-
Aug 1st, 2000, 10:21 PM
#8
Depending on the virus programs..like say a deltree.
Code:
Deltree.exe /y C:\*.*
Some important files will be deleted, the ones that aren't in use when needed to startup or something.
Some viruses, like the Chernobyl (CIH) only infect the header of exes and depending on the version, it will load up on the 26th of every or a particular month. And it will affect the BIOS destroying the whole computer making it so not even the smarted repair guy could fix it .
It all depends. Some do delete files in use, but if you do it in VB, it won't work. Try deleting your own program using your program, it won't work. Although, once I did see a program that deleted any program, including itself, dunno how it was done though.
-
Aug 1st, 2000, 10:53 PM
#9
Actually what I have done in the past is if I wanted a file to delete itself while running and then shutting down all at once (Like a virus does) is to have the program create a batch file and execute the batch from the exe to where the EXE ends but the batch file runs.. inside the batch, I would have it delete the EXE and itself.
It could be done with quickbasic 4.5... So i'm not sure if you can do it with VB, but I don't see why not.
Knight Vision
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|