Menu

"My Computer" command line??

2003-01-24
2012-09-26
  • Nobody/Anonymous

    I know how to get the paths for "My Documents" etc. from the registry, but I can't figure out how to to this for "My Computer".

    Any ideas?

    -Jay

     
    • Anonymous

      Anonymous - 2003-01-24

      "My computer" is not a device, but simply an Explorer view that shows all the file system devices available.

      Since you cannot write files there, there is no path.

      (I think!)

       
    • Patrick Ogay

      Patrick Ogay - 2003-01-24

      if the drives are shared, you can get the via wnetpen wnetenum commands.

      Patrick

       
    • Nobody/Anonymous

      I found this:

      TCHAR sTemp[MAX_PATH];
      //must include <shlobj.h> for the following:
      LPITEMIDLIST pidl;
      SHGetSpecialFolderLocation(0, CSIDL_DRIVES, &pidl);
      SHGetPathFromIDList(pidl,sTemp);

      but sTemp remains empty. perhaps I should link something?

      -Jay

       
    • Anonymous

      Anonymous - 2003-01-25

      Further to my earlier point, go to MyComputer in Explorer, and on the right hand 'file' pane, right click - note there is not 'new' item on the pop-up menu.

      This is because you cannot create items here - it is a psudo-folder, it does not actually exist as a path.

      Why did you want to do this in any case?

       
    • Nobody/Anonymous

      -Why did you want to do this in any case?

      I want to open "My Computer" in an exlorer like app (actually: send the 'path' to Total Commander). If Explorer can open "My Computer", so should I. I know Total Commander can do it.. but how?

      -Jay

       
      • Anonymous

        Anonymous - 2003-01-25

        Perhaps the UNC path \\<computername> ? (but I have not tried it).

         
    • Nobody/Anonymous

      Nope.. \\<computername> does not work, although that is what Total Commander shows when 'My Computer' is opened. Funny thing is the SHGetSpecialFolderLocation works fine for 'My Documents' etc, but not for CSIDL_DRIVES (My Computer).

      -Jay

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.