Re: How to get Windows/System directory name from driver?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Max Burmistrov (bugs-=do-not-spaam-pls=-bunny_at_e-mail.ru)
Date: 05/29/04


Date: Sat, 29 May 2004 13:41:47 +0400

Thanks, but unfortunately my problem couldn't be solved in this way: I need
to check if the file which is accessed is svchost.exe and it is located in
correct folder. So I get a string "c:\winnt\system32\svchost.exe -k netsvcs"
and I have to say "yes, it is a valid svchost.exe process" and I have to say
"no", if, for example, I get "c:\someotherfolder\svchost.exe".

Surely I can pass this parameter from user-mode application when I start my
driver, but is it the easiest way to solve this problem?

"Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
news:Otl9bPRREHA.3748@TK2MSFTNGP09.phx.gbl...
> you can use \systemroot as the start of the file name. this will root you
> at the %windows% directory w/out needing to know the actual drive or
> installation directory name.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>



Relevant Pages

  • Re: How to get Windows/System directory name from driver?
    ... this will root you ... at the %windows% directory w/out needing to know the actual drive or ... Please do not send e-mail directly to this alias. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Fedora Core 2 Maintenance
    ... On Windows ... By default it is mailed to root. ... have to have sendmail running to deliver it, ... add an alias for root to your email account. ...
    (alt.os.linux.redhat)
  • Re: How does LogonUser API work to prevent impersonating users?
    ... (ByVal Destination As Integer, ByRef Source As SecBuffer, ByVal Length As ... Alias "QuerySecurityPackageInfoA" (ByVal PackageName As String, ... > multiple times on both the client and server to do a handshake. ... >> Windows username of the currently logged on user to the application. ...
    (microsoft.public.dotnet.security)
  • Re: Is my directory corrupted?
    ... >apache or administrate.... ... OK - it can be a real problem running as root, ... you've got an alias going there - your 'ls' is actually running as ... Also, is your Samba server in there - again, these should ...
    (alt.os.linux)
  • alias is a vile weak little man
    ... Hate to tell you but Windows as an OS will see its last incarnation with Windows 7. ... Maybe Alias should buy Lottery tickets. ... Those were insults sheep-fukker! ... No, those were questions that, if interpreted a certain way, could be perceived as implied insults but only if you answer yes so now we have your answer; you had sex with both your mother and father. ...
    (microsoft.public.windows.vista.general)