|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to get user under W98 without WMICan anyone tell me either
a) how to find the user of a process or, failing that b) how to find the currently logged in user with .NET1.1 under Windows 98 without WMI. -- Dave Hello Dave,
API GetUserName http://www.pinvoke.net/default.aspx/advapi32/GetUserName.html D> Can anyone tell me either D> a) how to find the user of a process D> or, failing that D> b) how to find the currently logged in user D> with .NET1.1 under Windows 98 without WMI. --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche Argh - yes. However, that is the same as Environment.UserName and returns the
user that is running the current process, not a specific process from the processes list. I suppose, thinking about it, it's probably the same thing under Windows 98, as there are no services so presumably no "system" users, and no fast user switching, so all processes must be run by the same user. Also, I had very odd results with Environment.UserName - if I didn't set up any users on a new W98 installation then Environment.UserName returned "User" which must be some sort of default. However, I then set up a real user. Then, when I logged in, I hit Cancel on the login dialogue. Now, strangely, Environment.UserName returns blank. Go figure, as they say. I suppose W98 just doesn't handle users properly and there it is. Nevertheless, thanks for getting back to me. -- Show quoteHide quoteDave "Michael Nemtsev" wrote: > Hello Dave, > > API GetUserName > > http://www.pinvoke.net/default.aspx/advapi32/GetUserName.html > > D> Can anyone tell me either > D> a) how to find the user of a process > D> or, failing that > D> b) how to find the currently logged in user > D> with .NET1.1 under Windows 98 without WMI. > --- > WBR, > Michael Nemtsev :: blog: http://spaces.msn.com/laflour > > "At times one remains faithful to a cause only because its opponents do not > cease to be insipid." (c) Friedrich Nietzsche > > >
How to generate the .Net project file ".*proj" dynamically in .Net 2.0 ???
ASP.NET 2.0 : where are the project files ??? Copying FIles Error .NET installer tips needed VB6 Module in C# 2003 Autogenerate classes from xml schema .xsd file (not from dos prompt) How to get the data before IE RangeValidaor throwing exception .NET 1.1 version of Datagrid available within VS 2005? reading add/remove programs? or help making distribution package |
|||||||||||||||||||||||