.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old April 21st, 2004, 05:45 PM
Dragonswrd's Avatar

Dragonswrd Dragonswrd is offline
Corporal
 
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Dragonswrd is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old April 21st, 2004, 05:48 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: OT: Does anyone know VB?

kill "filename"
Reply With Quote
  #3  
Old April 21st, 2004, 06:06 PM
Dragonswrd's Avatar

Dragonswrd Dragonswrd is offline
Corporal
 
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Dragonswrd is on a distinguished road
Default 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.
Reply With Quote
  #4  
Old April 21st, 2004, 08:11 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: OT: Does anyone know VB?

Nope. I just use regedit.
Reply With Quote
  #5  
Old April 21st, 2004, 08:32 PM
Dragonswrd's Avatar

Dragonswrd Dragonswrd is offline
Corporal
 
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Dragonswrd is on a distinguished road
Default Re: OT: Does anyone know VB?

Oh well, thanks for the other help.
__________________
Violence is the Last refuge of the incompetent.
Reply With Quote
  #6  
Old April 21st, 2004, 10:35 PM
Parasite's Avatar

Parasite Parasite is offline
Second Lieutenant
 
Join Date: Jul 2003
Location: Texas
Posts: 464
Thanks: 0
Thanked 0 Times in 0 Posts
Parasite is on a distinguished road
Default 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
Reply With Quote
  #7  
Old April 22nd, 2004, 03:20 PM
Dragonswrd's Avatar

Dragonswrd Dragonswrd is offline
Corporal
 
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Dragonswrd is on a distinguished road
Default 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.
Reply With Quote
  #8  
Old April 22nd, 2004, 05:23 PM
Parasite's Avatar

Parasite Parasite is offline
Second Lieutenant
 
Join Date: Jul 2003
Location: Texas
Posts: 464
Thanks: 0
Thanked 0 Times in 0 Posts
Parasite is on a distinguished road
Default 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
Reply With Quote
  #9  
Old April 23rd, 2004, 12:20 AM
Ed Kolis's Avatar

Ed Kolis Ed Kolis is offline
General
 
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
Ed Kolis is on a distinguished road
Default 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?
Reply With Quote
  #10  
Old April 23rd, 2004, 02:53 PM
Dragonswrd's Avatar

Dragonswrd Dragonswrd is offline
Corporal
 
Join Date: Apr 2001
Location: Topeka, KS
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Dragonswrd is on a distinguished road
Default Re: OT: Does anyone know VB?

Regretably, I don't know anything about VB.Net.
__________________
Violence is the Last refuge of the incompetent.
Reply With Quote
Reply

Bookmarks


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 On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:39 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.