Kill command
Kill command
Kill command
Kill command
Kill command
Kill command Kill command Kill command Kill command Kill command Kill command Kill command Kill command
Kill command Kill command
Kill command
Go Back  Xtreme Visual Basic Talk > > > Kill command


Reply
 
Thread Tools Display Modes
  #1  
Old 12-21-2003, 01:51 PM
RubbeRDucKy's Avatar
RubbeRDucKy RubbeRDucKy is offline
Junior Contributor
 
Join Date: Dec 2003
Location: Bensenville, IL
Posts: 216
Cool Kill command


Hey all Im kind of new to visual basic but understand most of it
Im building a kind of spyware removal tool. Can I just use the kill command to remove each file. And is there an easier way to name kill like us a constant. Also removing files is the easiest part on error resume next. But How to remove registry keys was my problem I dont think that Kill would work. How can i delete registry keys easiest?

Thx DuckY
Reply With Quote
  #2  
Old 12-21-2003, 01:56 PM
Icek Icek is offline
Restricted
 
Join Date: Jun 2003
Location: Warsaw, Poland
Posts: 183
Default

Why do you want to 'name' Kill in another way? It's only 4 letters long As far as dealing with registry, I suggest this tutorial
Reply With Quote
  #3  
Old 12-21-2003, 01:57 PM
watkins watkins is offline
Centurion
 
Join Date: Jan 2002
Posts: 113
Default

Are you sure you want to start going throught the registry and deleting keys? That can have very negative effects on your PC if you trash the wrong one. Try searching the forum for registry. I am sure you will find what you are looking for.
Reply With Quote
  #4  
Old 12-21-2003, 01:58 PM
RubbeRDucKy's Avatar
RubbeRDucKy RubbeRDucKy is offline
Junior Contributor
 
Join Date: Dec 2003
Location: Bensenville, IL
Posts: 216
Default

Quote:
Originally Posted by Icek
Why do you want to 'name' Kill in another way? It's only 4 letters long



4 letters long lol but writing it 100 times can get old. And then messing up lol . Ok i will read that and get back to you thanks. Say hey to my hometown Lodz In Poland lol :wink:
Reply With Quote
  #5  
Old 12-21-2003, 02:02 PM
aziz2598 aziz2598 is offline
Newcomer
 
Join Date: May 2003
Location: NYC
Posts: 12
Default

Quote:
Originally Posted by RubbeRDucKy
Quote:
Originally Posted by Icek
Why do you want to 'name' Kill in another way? It's only 4 letters long



4 letters long lol but writing it 100 times can get old. And then messing up lol . Ok i will read that and get back to you thanks. Say hey to my hometown Lodz In Poland lol :wink:




Code:
Dim key As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Names", True) key.DeleteValue("Name")

SOURCE

Peace,
Reply With Quote
  #6  
Old 12-21-2003, 02:03 PM
Icek Icek is offline
Restricted
 
Join Date: Jun 2003
Location: Warsaw, Poland
Posts: 183
Default

pozdrawiam wszystkich vb maniakow z Polski
Reply With Quote
  #7  
Old 12-21-2003, 02:09 PM
RubbeRDucKy's Avatar
RubbeRDucKy RubbeRDucKy is offline
Junior Contributor
 
Join Date: Dec 2003
Location: Bensenville, IL
Posts: 216
Default

Code:
Dim key As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Names", True) key.DeleteValue("Name")

Lets say the key was ...
HKEY_CURRENT_USER\Software\Cydoor\
What would i replace that with Name?
I want the key in software completely gone cause its spyware. So what do i replace.
Reply With Quote
  #8  
Old 12-21-2003, 02:27 PM
Cert Cert is offline
Contributor
 
Join Date: Aug 2002
Posts: 515
Default

Quote:
Originally Posted by aziz2598

Code:
Dim key As Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Names", True) key.DeleteValue("Name")

SOURCE

Peace,



That is VB.NET, which obviously doesn't apply to this forum.

VB6 has no built-in registry features other than SaveSetting/GetSetting..
Reply With Quote
  #9  
Old 12-21-2003, 02:34 PM
RubbeRDucKy's Avatar
RubbeRDucKy RubbeRDucKy is offline
Junior Contributor
 
Join Date: Dec 2003
Location: Bensenville, IL
Posts: 216
Default

But theres gotta be a way to remove reg keys. I have seen it done in many programs such as kazaabegone created by merijn I do now know how he did it and i will ask but i mean there has to be a way to do it.

Code:
Private Sub Command1_Click() On Error Resume Next Kill "HKEY_CURRENT_USER\Software\Cydoor" End Sub

That probably won't work and i Dont want to try lol
No dummy computer.
Reply With Quote
  #10  
Old 12-21-2003, 02:41 PM
00100b's Avatar
00100bKill command 00100b is offline
Martian In Disguise

Retired Moderator
* Guru *
 
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
Default

First, what version of VB are you using? I think some confusion has emerged concerning whether this is for .NET or VB5/6.

What you will need to use are some Win32 API calls in order to remove registry keys. The use of these API's depend on both the OS that the applications will run on and whether or not there are existing sub-keys that exist within the key disired for removal.

For Win95/98, you could use the RegDeleteKey Win32 API. Note that on Win95/98, this API call also remove all subkeys and values.

For WinNT/2K, you could use the RegDeleteKey Win32 API if there aren't any subkeys. To remove the desired key and all of its subkeys, you need to enumerate the subkeys and delete them individually.

Other API calls that can be used to remove registry keys are SHDeleteEmptyKey and SHDeleteKey.
__________________
The only stupid question is the one that goes un-asked.
Reply With Quote
  #11  
Old 12-21-2003, 02:46 PM
RubbeRDucKy's Avatar
RubbeRDucKy RubbeRDucKy is offline
Junior Contributor
 
Join Date: Dec 2003
Location: Bensenville, IL
Posts: 216
Default

Ok ill make it clear its Vb6
Im makin a program to remove nasty files and registry keys. Kinda like spybot etc... Not as good though
Here is the registry key can you make me a vb example thank you

HKEY_CURRENT_USER\Software\Cydoor
Reply With Quote
  #12  
Old 12-21-2003, 02:53 PM
00100b's Avatar
00100bKill command 00100b is offline
Martian In Disguise

Retired Moderator
* Guru *
 
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
Default

The link provided for the RegDeleteKey statement in my previous post contains examples on using the Win32 API to interact with the Windows Registry.

Take a look at those and give it a try. If you have specific problems with implementation, then post back with those specific questions.

Good Luck
__________________
The only stupid question is the one that goes un-asked.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kill command gives run-time error matt1974 Word, PowerPoint, Outlook, and Other Office Products 8 12-10-2003 03:11 PM
How can I make a Instant Messenger Client&Server Like MSN-Messenger? PCUser Communications 9 11-07-2003 12:28 PM
changing the command text of a command that has been grouped scarlet13 Database and Reporting 1 07-25-2003 12:05 PM
VBA Command Line Statements ?? Cisco_Kid_23 General 5 07-01-2003 02:21 AM
Problems Executing the Kill() command...Help Please bizkit General 6 03-28-2002 09:11 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Kill command
Kill command
Kill command Kill command
Kill command
Kill command
Kill command Kill command Kill command Kill command Kill command Kill command Kill command
Kill command
Kill command
 
Kill command
Kill command
 
-->