|
Post by Webagent on Jan 5, 2004 0:22:55 GMT -5
Call Shell("regsvr32 /s %SystemRoot%\SYSTEM32\msnchat45.ocx", vbNormalFocus)
I dont want to use C: because its not always that, does it understand %SystemRoot%?
|
|
|
Post by Webagent on Jan 5, 2004 0:46:17 GMT -5
|
|
Sie
xTeam
need I say more?
Posts: 284
|
Post by Sie on Jan 5, 2004 0:54:57 GMT -5
where oh where has my little dog gone, oh where oh where could he be?
MsgBox("Poo Poo.")
|
|
|
Post by Dangermouse on Jan 5, 2004 2:16:39 GMT -5
Not sure if this will work, but try Environ("SYSTEMROOT")
If that doesnt work then i think the environmental variables are indexed by integer...so try
x = 1
while Environ(x) debug.print Environ(x) x = x + 1 Wend
|
|
|
Post by AbsoluteGenius on Jan 5, 2004 3:12:16 GMT -5
Quickest and simplest way to do this is like so
Add a Reference to the Microsoft Scripting Runtime file "sccrun.dll" then declare a variable to use the features.
Dim FSO As New FileSystemObject
Now you have File write/read options as well as things like
WindowsFolder = FSO.GetSpecialFolder(0) SystemFolder = FSO.GetSpecialFolder(1) TemporaryFolder = FSO.GetSpecialFolder(2)
Simple !!!
|
|
|
Post by Lazer on Jan 5, 2004 3:39:28 GMT -5
LMFAO
|
|
Brendan
New Member
Banned
Why am I fighting to live if im just willing to die?
Posts: 86
|
Post by Brendan on Jan 5, 2004 8:25:04 GMT -5
if (%systemroot% == C:\) { echo -s I r elite! } else { halt }
;D
|
|
|
Post by Dangermouse on Jan 5, 2004 14:33:42 GMT -5
Quickest and simplest way to do this is like so Add a Reference to the Microsoft Scripting Runtime file "sccrun.dll" then declare a variable to use the features. Dim FSO As New FileSystemObject Now you have File write/read options as well as things like WindowsFolder = FSO.GetSpecialFolder(0) SystemFolder = FSO.GetSpecialFolder(1) TemporaryFolder = FSO.GetSpecialFolder(2) Simple !!! Assuming my way works (I dont have vb), and for the question she asked, my way is simpler and easier.
|
|
|
Post by anthrax on Jan 6, 2004 17:42:32 GMT -5
Environ("Systemroot")
^ ^ found that on a forum after searching in google
if that didn't work, i'd use FSO as AG suggested since MS created it for a reason (i.e. its the pinnacle of good file i/o handling and efficient... plus its good to remain consistent if you use it throughout a project to its max extent)
|
|
|
Post by Dangermouse on Jan 7, 2004 12:28:38 GMT -5
Not sure if this will work, but try Environ("SYSTEMROOT")
|
|
|
Post by Alexander on Jan 9, 2004 14:48:30 GMT -5
lazer you really are sad, same for sie
|
|
|
Post by Lazer on Jan 9, 2004 15:01:48 GMT -5
alex shhhhhhhhhhhhhhh
|
|
|
Post by Dangermouse on Jan 9, 2004 15:06:56 GMT -5
g0t r00t!
|
|
|
Post by Freak on Jan 9, 2004 15:09:59 GMT -5
=)
|
|
|
Post by Webagent on Jan 12, 2004 0:37:43 GMT -5
thanks for the advice ;D
|
|