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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open email profile setup problem 1

Status
Not open for further replies.

cruford

Programmer
Dec 6, 2002
138
US
I am just trying to open the "mail" control panel object through script on a Windows 98 box. I have tried:

WSHShell.Run "rundll32.exe shell32.dll,Control_RunDLL mlcfg32.cpl"

and

WSHShell.Run "rundll32.exe shell32.dll,Control_RunDLL wgpocpl.cpl"


Neither of them open the mail setup. It doesn't do anything when it runs. I am doing the same thing with adding a printer and it does work. (WSHShell.Run "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter") Does anyone know why or have an alternative? Better yet does any have code to automate setting up Exchange settings in Outlook through script or WMI? Thank in advance
 
Hello cruford and xmsre,

The run method line goes like:
Code:
createobject("wscript.shell").run "control.exe " & chr(34) & "c:\program files\common files\system\mapi\1028\95\mlcfg32.cpl" & chr(34)
(detail of the path depends on your system)

regards - tsuji
 
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.run "control C:\PROGRA~1\COMMON~1\System\MSMAPI\1033\mlcfg32.cpl", 1

It works on XP/OL2K3.

 
It had issues with the spaces in the path, so I looked up the path for mlcfg.cpl in the registry under

HKCU\Controlpanel\mmcpl

the value mlcfg.cpl.

I assume you could have the script look up the reg key to get the path also.

 
Star for you tsuji, that works perfect.

Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top