|
|
|
|
April 21st, 2004, 05:45 PM
|
|
Corporal
|
|
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
OT: Does anyone know VB?
I am writing a program that needs to delete a file, but I can't find the command or the syntax to make it delete the file. Any help would be useful.
__________________
Violence is the Last refuge of the incompetent.
|
April 21st, 2004, 05:48 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: OT: Does anyone know VB?
kill "filename"
__________________
Things you want:
|
April 21st, 2004, 06:06 PM
|
|
Corporal
|
|
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: Does anyone know VB?
It worked. Thank you very much. Do you by any chance know how to delete a registry entry under VB? I am writing a program, not a virus by the way, that will delete a specified file and registry entry.
__________________
Violence is the Last refuge of the incompetent.
|
April 21st, 2004, 08:11 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: OT: Does anyone know VB?
Nope. I just use regedit.
__________________
Things you want:
|
April 21st, 2004, 08:32 PM
|
|
Corporal
|
|
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: Does anyone know VB?
Oh well, thanks for the other help.
__________________
Violence is the Last refuge of the incompetent.
|
April 21st, 2004, 10:35 PM
|
|
Second Lieutenant
|
|
Join Date: Jul 2003
Location: Texas
Posts: 464
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: Does anyone know VB?
Try the "DeleteSetting" function. Use "GetSetting" to pullinfo out.
__________________
I thought of the sun as a big bright ball of something that produced an intense absence of darkness. Alan Dean Foster No More Crystal Tears
A++SeGdy$+-++Fr?C++++Cst+SfAi--Mm-MpTS---SsROPw++Fq++Nd++++RpG++Mm++Bb
|
April 22nd, 2004, 03:20 PM
|
|
Corporal
|
|
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: Does anyone know VB?
I thought of that, but that only lets you delete something from the VB section of the registry.
__________________
Violence is the Last refuge of the incompetent.
|
April 22nd, 2004, 05:23 PM
|
|
Second Lieutenant
|
|
Join Date: Jul 2003
Location: Texas
Posts: 464
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: Does anyone know VB?
I looked and there is also a "RegDelete" method. I don't really call it VB since it is a windows call. I have not used it, but the MSDN help looked like it might be what you need.
code:
[VBScript]
Dim WshShell, bKey
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY"
WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\MindReader", "Goocher!", "REG_SZ"
bKey = WshShell.RegRead("HKCU\Software\ACME\FortuneTeller \")
WScript.Echo WshShell.RegRead("HKCU\Software\ACME\FortuneTeller \MindReader")
WshShell.RegDelete "HKCU\Software\ACME\FortuneTeller\MindReader"
WshShell.RegDelete "HKCU\Software\ACME\FortuneTeller\"
WshShell.RegDelete "HKCU\Software\ACME\"
__________________
I thought of the sun as a big bright ball of something that produced an intense absence of darkness. Alan Dean Foster No More Crystal Tears
A++SeGdy$+-++Fr?C++++Cst+SfAi--Mm-MpTS---SsROPw++Fq++Nd++++RpG++Mm++Bb
|
April 23rd, 2004, 12:20 AM
|
|
General
|
|
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
|
|
Re: OT: Does anyone know VB?
Is this by any chance VB .NET? The .NET runtime has some handy classes for manipulating the registry
__________________
The Ed draws near! What dost thou deaux?
|
April 23rd, 2004, 02:53 PM
|
|
Corporal
|
|
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: Does anyone know VB?
Regretably, I don't know anything about VB.Net.
__________________
Violence is the Last refuge of the incompetent.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|