Execute Desktop Icon

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an icon set up on my desktop to establish a dial-up network connection
with a remote computer. I would like to be able to execute it from my code,
but there is no obvious program to run with a Shell command. Is there a way
to access this?
 
TCronin said:
I have an icon set up on my desktop to establish a dial-up network connection
with a remote computer. I would like to be able to execute it from my code,
but there is no obvious program to run with a Shell command. Is there a way
to access this?

The command you want to Shell is "rasdial". Open a command window and type
"rasdial /?" to get usage info.
 
I've been playing with the rasdial command and it seems to be what i need,
however, when i try to execute it with the Shell command, i see a DOS window
open and immediately close before anything happens. Since i use the Shell
command successfully for other things, i believe i call it correctly. Is
there something about the rasdial command that requires me to do something
differently? Thanks for your help.

Tim
 
TCronin said:
Brian,
I expect the command window to open, my problem is that it immediately
closes before rasdial can execute. When i run other programs in the command
window, this does not happen. I've tried all the options shown for the
WindowStyle parameter. Is there something else I can try?

Thanks,
Tim

Oh I see, I was under the impression that the command was working OK. I can
Shell rasdial successfully, so it works in principle. Have you tried
executing your exact command directly in the command window (i.e. not by
using Shell) to make sure that your syntax etc is OK?
 
Brian,
It looks like i was having trouble getting quotes around the connection name
properly. That seems to have taken care of it. Thanks for all your help

Tim
 
Back
Top