Kev Sherratt
12/16/2002 5:22:00 PM
Good grief. No, please, don't ever do this kind of
thing. Unless you want to open up your system to all
sorts of potential security breaches, this is a really
daft thing to do.
You can exploit a similar trick commonly used in Unix
shell script programming. As a simple example, create a
file (logoff.bat) in the same folder as you're running
the code below from. In this batch file, put something
like "explorer.exe". Save this and run your program.
Watch in wonder as a new version of Windows Explorer pops
up on your screen. This in turn depends on which program
named "explorer.exe" it finds in your path first.
Silly example, but if it were a more malicious trojan,
you could end up with some serious trouble on your
hands. Especially if you run with any elevated
privileges.
Just say no! Do it properly, or don't do it at all.
K.
>-----Original Message-----
>stupid side note... in WinNT5 spawn the logoff process.
it's less coding.
>
>dim p1 as new Process()
>p1.StartInfo.FileName = "logoff"
>p1.Start()
>'<snip>