Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In WinXP SP3, Is it possible to open the "My Documents Properties" dialog box from the command line? The dialog box I am referring to is the dialog box then opens when you right click on the "My Documents" folder and open the properties.

I have searched for a means of doing this without success. This file: %windir%\system32\mydocs.dll contains the dialog box, but I cannot figure out how to load it from the command line.

share|improve this question

6 Answers 6

I just tested rundll32 on that path you provided and I had no luck.

I do not think you can do this from the command prompt. If you say what it is you are trying to achieve, I or someone else may be able to recommend an alternative way of doing it (through registry keys, or other commands etc.)

share|improve this answer
    
My goal is to change the folder associated with the "My Documents" folder to a different folder, but without moving files. By default "My Documents" point to C:\Documents and Settings\USER NAME\My Documents, but I want to reassign "My Documents" to a flash drive. I have seen registry entries, but those require a reboot whereas using the built in "Move" from the dialog box works instantaneously. –  the3seashells Oct 12 '09 at 18:56

Reading your comment on Wil's solution, you can move the target of My Documents like so:

  • Right-click My Documents and go to properties:

    alt text

  • Click "Move" and select the new location to store documents:

    alt text

  • Apply & OK

share|improve this answer
    
Thank you for the thorough reply. I understand how to move the destination of the folder, what I am trying to figure out is how automate the "Right-click My Documents and go to properties" step. I am attempting to get that dialog to display from the command line / run prompt. –  the3seashells Oct 12 '09 at 19:08
    
When you click on Apply, an message will pop up asking you if you want to move the present files to the new location. Just say "No". –  Ganesh R. Oct 12 '09 at 19:09
    
Regarding a reboot in-case of registry entries, I think the reboot is required for the explorer to get the new values. Did you try do the registry entries -> crash explorer -> start explorer. Just a thought. –  Ganesh R. Oct 12 '09 at 19:11

So far, I haven't been able to find a method for automating this task. As a guide to what I've been looking towards, to possibly help you on your search, the following command at a command prompt will open My Documents:

explorer.exe ::{450D8FBA-AD25-11D0-98A8-0800361B1103}

The path here is the CLSID, and a list of such IDs can be viewed here. Given this information, if you can find how the CLSID is referenced, you may be able to change it this way.

If you already have a registry method for changing the folder that requires a reboot, you should be able to restart explorer programmatically in order to have the same effect:

taskkill /F /IM explorer.exe
explorer.exe
share|improve this answer

Providing you have a "My Documents" icon displayed on the Desktop, this AutoIt script should do the trick:

WinActivate("[CLASS:Progman]", "")
Send("My Documents")
Send("+{F10}")
Send("{UP}")
Send("{ENTER}")

First, it selects the desktop, then it selects the "My Documents" icon. It sends SHIFT-F10, the shortcut for "right-click". The UP key will select the last item of the menu ("Properties" item for "My Documents") and press ENTER to open it.

Tested it on Windows 7 RTM English, except that I replaced "My Documents" with "Recycle Bin" for testing, as there is no "My Documents" in Windows 7. I have no XP to test this unfortunately. I'm not 100% sure about the "CLASS:Progman" entry, although this is old legacy and should be the same for XP.

share|improve this answer
    
Not everyone has the icon on the desktop though :\ –  John T Oct 12 '09 at 19:34
    
I know, no idea is this is a possible requirement or if one must find a way that does not require the "My Documents" icon on the Desktop... –  Snark Oct 12 '09 at 19:40
    
If need be, I can write a AutoHotKey script that opens the Start Menu and send the keystrokes to open the "My Documents Properties" that way, but I was hoping to find a way to manually open the box. –  the3seashells Oct 12 '09 at 20:24

I don't know how to do a perl -e '...' with VBScript, (and no guarantees on style or idiom with the following) but you can invoke this script from the commandline:

set shell = CreateObject("Wscript.Shell")
set app = CreateObject("Shell.Application")
app.namespace(0).parsename(shell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell 

Folders\Personal")).invokeVerb("P&roperties")
MsgBox("Click OK")

The final MsgBox() keeps the script from immediately exiting and (!) killing the properties window.

share|improve this answer
    
Thank you for taking the time to write this. This solutions gets very close, but rather than open the custom "My Documents Properties" window (see John T's screen shot below), it only opens the standard folder properties window. –  the3seashells Oct 12 '09 at 20:21

Looking at the answers and your comments, did you know that you can just drag your folder from the old location to the new? No dialog boxes popping up or anything and Windows will automatically remap all of the required paths for your user profile to point to the new location. (In XP that'd be the My Documents, My Pictures, and My Music folders).

Also, looking at the exports for mydocs.dll, it looks to be a COM DLL with no visible entry points for you to use with rundll32. Of course, I could be wrong about that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.