What is the syntax for finding the windir, and putting it into a string and adding /system32
I have Dim strWinDir As String
strWinDir = %WINDIR%&"\system32"
but it says that the first % in %WINDIR% is invalid! Please help!
Josh
Printable View
What is the syntax for finding the windir, and putting it into a string and adding /system32
I have Dim strWinDir As String
strWinDir = %WINDIR%&"\system32"
but it says that the first % in %WINDIR% is invalid! Please help!
Josh
this line of code gets system directory
VB Code:
Dim sysdir As String = System.Environment.SystemDirectory msgbox (sysdir)
thanks, that fixed it. What I need to know now is, why it wont let me delete a file it created from a dll. I tried using File.Delete, and it didnt work, and Kill("") and it didnt work. I always got access denied errors. Can u help me figure out how to delete files?
Josh
are you trying to delete system dll files :eek: ??
No, no... It is a skinning program. To change the skin, you replace a system file. I just need to delete the system file, then send the new file on over.
Josh
PS pirate, do u have an IM address?
this delete the dir and sub-dirs and files if set to true otherwise it won't .
VB Code:
'true means you delete all sub-dir and files IO.Directory.Delete(yourpath, True)
ok, here is how I want it implacated:
File.Move("C:\WINDOWS\system32\wmploc.dll", "C:\WMPT\wmploc.old")
Instead of C:\WINDOWS, %windir%
so, how would I do that?
Josh
I tried this and worked ? Just use it like you did .any problems??
VB Code:
File.Move("c:\text.txt", "c:\aa\text.txt")
Um, how do u open a new form? In VB 6, u just said form1.load and then form1.show or whatever, it doesnt work like that in VB.NET. Thanks for all the help.
Josh
VB Code:
Dim frm As New Form1() ' or another form frm.Show()