1.

Solve : User Profile folder and WMI.?

Answer»

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...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.

He hasn't been back in almost 3 years now....



Discussion

No Comment Found