Explorer Command Line Parameters
Keywords: Explorer Command Line Parameters My Computer
Question:
How do you open Win95 Network Neighborhood?
Answer:
hmmm. Gee. Some explorer command line Option, I guess. Or make a shortcut to
the network neighborhood, called nethood.lnk, then
SHELLEXECUTE the shortcut, such as:
ShellExecute("c:\windows\desktop\nethood.lnk", "","", @NORMAL, "")
Some of the (known) Explorer command line options are mentioned below.
There is no known documentation on Explorer command line parameters
from Microsoft, however the following is roughly accurate: (Note that
the commas are required between switches on the Explorer.exe command line.
Explorer [/n] [/e] [,/root,object][[,/select],subobject]
where ...
Parameter:
- /n
Always opens a new window, even if the selected folder is already open.
- /e
Opens an expanded Explorer in the current folder. Normally Explorer starts in the root
of the startup-drive.
- /root,object
Defines an object from the named space to be used for the root of the
selected folder tree. Default is "Desktop".
- /select
The specified object will be selected (the folder 'above' it will be opened).
- subobject
Defines the folder which gets the focus, if "/select" is not set.
Default is the root drive, C:\.
Note:
Using "EXPLORER /SELECT,A:" will open the My Computer icon and
have the floppy drive selected.
The following code will open Explorer with the My Computer icon highlighted (the same as hitting
the Windows key+E. If the Z drive doesn't exist on your system, no drive is selected:
Run("explorer.exe","/e,/select,z:\")
Force Explorer to Start With the Folder You Want:
Few things in Windows are more irritating than the way that Explorer always opens C:\ when it's first opened. If you have an
entry in your Start Menu to run Explorer, you can change it to "Explore" at the folder of your choice:
- Open Explorer, and go to your Start Menu folder.
- Find the shortcut for Explorer, right click on it, and select Properties.
- Click on the Shortcut tab, and change the Target so it reads: c:\windows\EXPLORER.EXE /n, /e, d:\myfolder (where
c:\windows is your Windows directory, and d:\myfolder is the directory in which you want Explorer to start.)
Tip: To have Explorer start with My Computer, so no branches are initially expanded, use the following command line
options: /n, /e, /select, c:\
- tip submitted by Frank Pineau
Note: this won't work if you try to start Explorer by right-clicking on the Start Menu (here's why). Just put a shortcut to
EXPLORER.EXE in the top level of your Start Menu folder for easy access.
Related Question:
I'd like to know if anyone has found a way to bring up the "My Computer" Icon and
select the "Auto Arrange option"... I've scoured the registry looking for a way to hack a
fix. I'm deploying a bunch of PCs and would like to run this as part of an automated
build (that way I don't have to do the clicking myself).
PS It probably doesn't make any difference but I'm running NT 4.0...
Answer:
You could try something like this:
MouseMove(335, 110, "", "")
MouseClick(@RCLICK,0)
SendKey("ia")
Question:
How do you start Explorer with the Startmenu and Taskbar displayed?
Answer:
Try:
Run("systray.exe","")
Article ID: W12991
Filename: Explorer Command Line and My Computer.txt
File Created: 2002:09:30:11:22:42
Last Updated: 2002:09:30:11:22:42