Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: User Profile folder and WMI.  (Read 5521 times)

0 Members and 1 Guest are viewing this topic.

trojanz

  • Guest
User Profile folder and WMI.
« on: July 03, 2006, 02:02:06 AM »
Kudos to y'all! Ok, here's the thing. There's this remote computer where I know who's current;y logged on by simply running a vbScript aganist it. But the thing is, I also wanted to get the path of the currently logged on user's profile folder. I've searched the web regarding this and all I came out are for running the vbScript locally to be able to get the User Profile Folder. I don'y know if it's possible using WMI. Please help...

cyrusrynlee



    Starter

    Re: User Profile folder and WMI.
    « Reply #1 on: June 21, 2009, 06:50:50 PM »
    i use vbscript to connect to remote machines...so i dont know how to translate vbs code to c#. However, WMI classes are the same regardless of the language we use.

    Here's what you should do:

    I use ("WbemScripting.SWbemLocator").ConnectServer method (you must follow and specify the parameters of course e.g. username,password,etc.) plus the namespace (connect to e.g. "root\default") to connect to ANY remote machine  and then perform queries or commands using specified class (properties and methods). Download CIM studio from microsoft.com to find the class you need.


    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: User Profile folder and WMI.
    « Reply #2 on: June 21, 2009, 07:21:04 PM »
    He hasn't been back in almost 3 years now....
    " Anyone who goes to a psychiatrist should have his head examined. "