Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a VBS script on my local mac

Status
Not open for further replies.

uladzik

Programmer
Feb 12, 2001
55
BY
I have a VBS script on my local machine. I'd like to call a DUN (Dial Up Network connection) file from that script.

I've tried the following method:
Code:
Set dun = GetObject("c:\windows\desktop\nextra.dun")
but it doesn't work. Any suggestions? I'd be very thankful.

Just to give you some more background information:

1) If you want to try it yourself but you don't have a DUN file, just go to "My Computer", click on "Dial-Up Networking" and choose "Make new connection". Then cut&paste the file (not the shortcut) to the desktop. So you'll get a file with DUN extension on your desktop. If you double-click the icon, the "Connect To" dialogbox is launched. That's what I need to launch from my VBS.

2) I also tried to find the associated program by searching the file types, and it turned out that DUN files are handled by Rundll32.exe. Thus, I've tried to run a command line "rundll32 c:\windows\desktop\nextra.dun" but it didn't work either.

Looking forward to any help!
Thanks in advance,
Uladzik



---
---
 
Hi,

This bit of code will do it.

Dim WSHShell
Set WSHShell = Wscript.CreateObject("Wscript.Shell")

WSHShell.Run("Rundll32.exe RNAUI.DLL,RnaRunImport c:\windows\desktop\filename.dun")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top