CD to special folders in CMD via CLSID

M

Michael Lueck

A while back I found a syntax for getting to the special Windows folders via their CLSID at the command line. I've lost that syntax / can't remember what tool allowed me to discover that. Anyone else
happen across that trick and remember it?

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Remove the upper case letters NOSPAM to contact me directly.
 
W

Wesley Vogel

Don't know any for cmd, but these work from Start | Run

OE makes the links automatically, I can't get rid of them. Ignore. The
wrap may also be funky.

This pasted in Start | Run
file:///::{20D04FE0-3AEA-1069-A2D8-08002B30309D}
opens My Computer

This pasted in Start | Run
file:///::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}
opens the Control Panel.

This pasted in Start | Run
file:///::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}
opens Printers and Faxes

This pasted in Start | Run
file:///::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{D20EA4E1-3957-11d2-A40B-0C5020524152}
opens the Fonts folder

This pasted in Start | Run
file:///::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
opens Scheduled Tasks

This pasted in Start | Run
file:///::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}
opens Network Connections

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
A

Al Dunbar [MS-MVP]

Thanks for the useful help. But if the CD command cannot deal fully with a
UNC, I doubt it will work on these special folders.

/Al
 
S

Stefan Kanthak

Top posting is nasty!
Thanks for the useful help. But if the CD command cannot deal fully with a
UNC, I doubt it will work on these special folders.

Hmmm... what do you mean with "CD cannot deal fully with UNC"?
AFAIK "CD" can't deal with UNC paths at all!
If you want to "cd" into an UNC path then use "PUSHD" instead.

All these "shell special folders" are known to .... you guess it: the
shell, i.e. the Explorer only. Use "START" from within CMD.EXE.

Stefan
 
M

Marty List

Oh great, a new little troll named Stefan has joined the party and needs to
start correcting everyone to prove himself. I've already setup a custom view to
hide his babble.
 
A

Al Dunbar [MS-MVP]

Stefan Kanthak said:
Top posting is nasty!

No nastier than your above comment, which is only prevented from being a top
post by the slimmest of margins.

I generally agree, however, there are some NG's I inhabit where top-posting
is commonly done, and done effectively. Since I was replying to a top-posted
reply, I perhaps forgot momentarily which NG I was in. Anyway, I do not
think the result created as large a tear in the space-time continuum as your
comment did.
Hmmm... what do you mean with "CD cannot deal fully with UNC"?
AFAIK "CD" can't deal with UNC paths at all!

It seems I misspoke somewhat - thanks for drawing my attention to the
oversight.

What I intended to say was that "CMD is not fully able to deal with a
default directory in UNC format". But it *can*, imho, *deal* with them at
least to the extent that a batch file can be started from an explorer window
opened at a UNC. Sure, it displays an error message, and then sets the
default directory somewhere on the local hard drive (at least that happens
for me). So, I disagree, with your suggestion that it (now meaning CMD)
"can't deal with UNC paths at all". If it couldn't deal at all, I would
expect a more horrible failure, including, at the very least, the batch file
not running at all.
If you want to "cd" into an UNC path then use "PUSHD" instead.

Yes, a good suggestion. But the default directory is still not in UNC
format.

/Al
 
M

Mark V

In said:
A while back I found a syntax for getting to the special Windows
folders via their CLSID at the command line. I've lost that
syntax / can't remember what tool allowed me to discover that.
Anyone else happen across that trick and remember it?

If by "special folders" you mean Shell Folders such as "My Computer",
then no. These are artifacts of the GUI explorer shell and do not
exist in the file system. If otherwise, say more.
 
S

Stefan Kanthak

Marty List said:
Oh great, a new little troll named Stefan has joined the party and needs to
start correcting everyone to prove himself. I've already setup a custom view to
hide his babble.

What a lovely null quote. You missed the point completely.
And now speak with me:
Die größten Kritiker der Elche waren früher selber welche.

Stefan
 
W

Wesley Vogel

The largest critics of the moose were in former times which. ???

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
T

Todd Vargo

Wesley said:
The largest critics of the moose were in former times which. ???

I got the same translation but thought better of posting its null meaning.

._________________________.
/\__/\ | |
/ O O\_| PLEASE DON'T |
/ \ FEED THE |
/ \ \ TROLLS! |
/ _ \ \______________________!
/ |\____\ \ ||
/ | | | |\____/ ||
/ \| | | |/ | _||
/ / \ ------- |_____| ||
/ | | | __)
| | | |_____ __)
| |_|_|_| | \___)
/\ | !!
/ /\ | /
/ / | | |
___/ / | | |
!____/ c_c_c_C/ \C_c_c_c
 
S

Stefan Kanthak

Wesley Vogel said:
The largest critics of the moose were in former times which. ???

Now you'll have to find that by yourself.

| ----- The following addresses had permanent fatal errors -----
| <[email protected]>
| (reason: 551 not our customer)
|
| ----- Transcript of session follows -----
| ... while talking to gateway-r.comcast.net.:
| >>> DATA
| <<< 551 not our customer
| 550 5.1.1 <[email protected]>... User unknown
| <<< 503 need RCPT command [data]

http://www.ietf.org/rfc/rfc1855.txt

I consider using wrong email addresses even nastier than top posting!

Stefan

[top posting removed]
 
M

Michael Bednarek

I got the same translation but thought better of posting its null meaning.

According to my understanding, Stefan was trying to say "People in glass
houses should refrain from throwing stones" or "When you point your
finger at another person, three fingers point back at you."

However, his choice of this particular German saying is unclear even to
native German speakers - as are some of his Usenet contributions, be
they in German or in English.

He likes to parade around in the manner of a "Blockwart" (1) of recent
German past, and berate people on their posting style. He reminds me why
I emigrated from Germany.

1) <http://en.wikipedia.org/wiki/Blockleiter>
 
S

Stefan Kanthak

Your email address is wrong and invalid!

[cut]
However, his choice of this particular German saying is unclear even to
native German speakers - as are some of his Usenet contributions, be
they in German or in English.

If this is Usenet: why don't you follow the standards and recommendations
http://www.ietf.org/rfc/rfc822.txt, .../rfc1036.txt, .../rfc1855.txt and
.../rfc2046.txt?
He likes to parade around in the manner of a "Blockwart" (1) of recent
German past, and berate people on their posting style. He reminds me why
I emigrated from Germany.
Erbaermlich!

1) <http://en.wikipedia.org/wiki/Blockleiter>

Godwin's law. RIP.

Stefan
 
M

Michael Lueck

Hi Wesley,

Yes, THAT is the syntax I remember seeing. I thought it was command line, but I guess it was GUI.

Oddly enough, while start->run accpets those, "explorer /e,file:////....." does not, and neither does pasting the "file:////..." string into the directory bar of explorer.exe.

I guess if it was not cmd.exe related, then my nifty idea was to be able to script open special folders directly... which I will have to continue looking to see how to utilize these "file:///..."
things to do that.

Thanks!

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Remove the upper case letters NOSPAM to contact me directly.
 
M

Michael Lueck

Michael said:
Oddly enough, while start->run accpets those, "explorer
/e,file:////....." does not...

BINGO, simplify the string a bit, "file:///" must be dropped and then all is well starting explorer in a specific special folder from the command line... Example:

explorer /e,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

Oh, FYI and PUSHD does not "cd" to either format of these special folders.

Thanks!

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Remove the upper case letters NOSPAM to contact me directly.
 
M

Marty List

Michael Lueck said:
BINGO, simplify the string a bit, "file:///" must be dropped and then all
is well starting explorer in a specific special folder from the command
line... Example:

explorer /e,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

Oh, FYI and PUSHD does not "cd" to either format of these special folders.

Thanks!

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Remove the upper case letters NOSPAM to contact me directly.


I almost posted that explorer syntax a couple weeks ago, but I figured I'd
get flamed since this is a command prompt group :)

You could put a script in your %PATH% that gets the name of the folder from
the command line, and either looks up the CLSID in the Registry, or looks up
the name using the SpecialFolders property of WSH, and then launches
explorer.

http://msdn.microsoft.com/library/en-us/script56/html/wsProSpecialFolders.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top