WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

FAQs - Frequently Asked Questions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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:

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:

  1. Open Explorer, and go to your Start Menu folder.
  2. Find the shortcut for Explorer, right click on it, and select Properties.
  3. 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