Execute Windows XP command prompt

DemonDNF

Registered User.
Local time
Today, 11:01
Joined
Jan 31, 2014
Messages
76
Hi,

I need to execute a specific panel from the bluetooth icon on the Windows XP task bar. Tim Fisher over here:
http://pcsupport.about.com/od/tipstricks/a/control-panel-command-line.htm
shows how to use Command Prompt to open the Bluetooth panel:

control bthprops.cpl

I tried it from the Command Promp window and it works great. I know the command prompt is CMD.exe and can execute it manually from START/RUN.

Now I need to tie all that together. The closest thing I found was these guys who show how to pass parameters to an executable:
http://social.msdn.microsoft.com/Fo...mt-and-passing-parameter-to-it?forum=netfxbcl
But they are talking Windows applications, looks like C code.

How would I go about triggering something like:
CMD.exe "control bthprops.cpl"
from within Access 2002?

Robert
 
Last edited:
SOLVED!

http://superuser.com/questions/1068...d-exe-a-command-and-then-stays-open-at-prompt

If only they all went like this one.

Code:
Private Sub cmdListPorts_Click()
On Error GoTo Err_cmdListPorts_Click
    Dim stAppName As String
    stAppName = "cmd.exe /c " & Chr(34) & "control bthprops.cpl" & Chr(34)
    Call Shell(stAppName, 1)
Exit_cmdListPorts_Click:
    Exit Sub
Err_cmdListPorts_Click:
    MsgBox Err.Description
    Resume Exit_cmdListPorts_Click
    
End Sub
 
Last edited:
(see post #2)

Don't you hate typing a reply at the same time as the other guy?

Thanks anyways. I added the code later to help the next guy.

Robert
:)
 

Users who are viewing this thread

Back
Top Bottom