Resolved How to get a processes FullName or Path

s1ckOh

Well-known member
Joined
Aug 1, 2011
Messages
68
Location
San Diego, Ca
Programming Experience
Beginner
im trying to get the full name of a process, say taskmgr for example with this code...

VB.NET:
        Dim theProcess As Process() = Process.GetProcessesByName("taskmgr")
        Try
            For inx As Integer = theProcess.Count - 1 To 0 Step -1
                MsgBox(theProcess(inx).MainModule.FileName)
            Next
        Catch
            MsgBox(ErrorToString)
        End Try

and i get this error...

A 32 bit processes cannot access modules of a 64 bit process

Is there any way around this or to get the full name a different way, maybe by PID somehow?

What I am trying to accomplish is for my program to know which folder was opened. Windows are opened under Explorer.exe and I want to be able to know if say the Music folder or some random folder was opened. I just need a push in the right direction of how i can accomplish this. maybe looking at the processes is the wrong approach, im not sure.

Thank you for ideas.

edit...

Answered my own question, sorry.

My solution was to look at Access Control Lists (ACL) for files and folders.
 
Last edited:
Back
Top