Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Find user under W98

Find user under W98

Scheduled Pinned Locked Moved C#
csharptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dave Midgley
    wrote on last edited by
    #1

    Can 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

    L 1 Reply Last reply
    0
    • D Dave Midgley

      Can 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

      L Offline
      L Offline
      Leyu
      wrote on last edited by
      #2

      Environment.UserName

      D 1 Reply Last reply
      0
      • L Leyu

        Environment.UserName

        D Offline
        D Offline
        Dave Midgley
        wrote on last edited by
        #3

        Argh - yes. However, that 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. Dave

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups