 |

04-26-2005, 07:27 PM
|
|
Newcomer
|
|
Join Date: May 2004
Location: Las Vegas, NV!
Posts: 21
|
|
How to launch explorer?
|
Hello. Sorry for being such a Visual Basic newbie, but how would I launch a standard Windows Explorer window to a the root directory of the program that is running from that program? For instance, say "mux.exe" is running. What code what I need in order to create a new Windows Explorer window that shows whatever directory "mux.exe" is in--like if "mux.exe" was located at C:\mux\mux.exe, it would open up a Windows Explorer window that is showing C:\mux.
Any help would be appreciated... as I just learned the "End" command today.

|
|

04-26-2005, 07:30 PM
|
 |
Senior Contributor
|
|
Join Date: Sep 2002
Location: Brisbane, Australia
Posts: 1,209
|
|
|
Shell "explorer.exe c:\mux", vbNormalFocus
|
__________________
Cheers,
Peter W.
|

04-26-2005, 07:35 PM
|
|
Newcomer
|
|
Join Date: May 2004
Location: Las Vegas, NV!
Posts: 21
|
|
Wow, thx for the timely response, but should it be:
---
Shell "explorer.exe c:\mux"
vbNormalFocus
---
Or as you typed it, in one line: --- Shell "explorer.exe c:\mux", vbNormalFocus ---?
And what if the program is running from a CD, whose drive letter I may NOT know: is it E or F or even G, etc. So is there a command to just go to the root of the program, the folder that the active program is running from?
Thx.

|
|

04-26-2005, 07:37 PM
|
 |
Senior Contributor
|
|
Join Date: Sep 2002
Location: Brisbane, Australia
Posts: 1,209
|
|
in that case:
Code:
Shell "explorer.exe " & app.path, vbNormalFocus
|
__________________
Cheers,
Peter W.
|

04-26-2005, 07:38 PM
|
|
Newcomer
|
|
Join Date: May 2004
Location: Las Vegas, NV!
Posts: 21
|
|
Thx. So fast... do you live on these forums!?!?
geesh.

|
|

04-26-2005, 07:39 PM
|
 |
Senior Contributor
|
|
Join Date: Sep 2002
Location: Brisbane, Australia
Posts: 1,209
|
|
|
lol only when there is nothing on at work.
|
__________________
Cheers,
Peter W.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|