|
-
Jan 27th, 2003, 08:00 PM
#1
Thread Starter
Member
%windir%
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
Smartbar XP is WAY better then Dashboard. http://www.smartbarxp.com
-
Jan 27th, 2003, 08:21 PM
#2
Sleep mode
this line of code gets system directory
VB Code:
Dim sysdir As String = System.Environment.SystemDirectory
msgbox (sysdir)
-
Jan 27th, 2003, 08:25 PM
#3
Thread Starter
Member
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
Smartbar XP is WAY better then Dashboard. http://www.smartbarxp.com
-
Jan 27th, 2003, 08:28 PM
#4
Sleep mode
are you trying to delete system dll files ??
-
Jan 27th, 2003, 08:30 PM
#5
Thread Starter
Member
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?
Smartbar XP is WAY better then Dashboard. http://www.smartbarxp.com
-
Jan 27th, 2003, 08:49 PM
#6
Sleep mode
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)
-
Jan 27th, 2003, 09:03 PM
#7
Thread Starter
Member
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
Smartbar XP is WAY better then Dashboard. http://www.smartbarxp.com
-
Jan 27th, 2003, 09:09 PM
#8
Sleep mode
I tried this and worked ? Just use it like you did .any problems??
VB Code:
File.Move("c:\text.txt", "c:\aa\text.txt")
-
Jan 27th, 2003, 09:22 PM
#9
Thread Starter
Member
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
Smartbar XP is WAY better then Dashboard. http://www.smartbarxp.com
-
Jan 27th, 2003, 09:24 PM
#10
Sleep mode
VB Code:
Dim frm As New Form1() ' or another form
frm.Show()
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
|