PDA

View Full Version : command to open date/time (WXP)



sbmtech
05-11-2002, 08:47 PM
I am trying to find a command to open the visual date and time control panel in Windows. Something I can type in the run box, or create a shortcut icon for. Anyone know how to do this? I thought the folks hanging out in this forum had a better shot at answering than the other forums. Thanks in advance!

Steve

POBrien
05-11-2002, 08:53 PM
http://www.dx21.com/SCRIPTING/RUNDLL32/ViewItem.ASP?NTI=4&SI=6&OID=95

The site above was originally furnished by Tony Klein.

Patrick (http://www.winguides.com/forums/sendprivate.php?Cat=&User=POBrien&Board=&Number=&what=online&page=&view=&sb=&part=&vc=><font)</font color=green> /images/forums/icons/smile.gif
<a target="_blank" href=http://www.winguides.com/subscribe/?guide=registry>WinGuides</a>

Jama
05-12-2002, 12:43 AM
You can add a few characters to the code from the page supplied by Patrick to get to a specific page in a control panel applet as fellows;

RunDLL32.EXE shell32.dll,Control_RunDLL timedate.cpl,@Z,X
Where the Z is the number of the tap stop you want highlighted. And X is the page number you want displayed. For example;

RunDLL32.EXE shell32.dll,Control_RunDLL timedate.cpl,@0,0
Would take you to the Date & Time page in the Date and Time Properties applet.

Where as this will take you to the Time Zone page in the same applet;
RunDLL32.EXE shell32.dll,Control_RunDLL timedate.cpl,@0,1

If you want to put this in a script, you have to use the ControlPanelItem object as follows;

Set sa = CreateObject("Shell.Application")
sa.ControlPanelItem("timedate.cpl,@0,1")

Jama

POBrien
05-12-2002, 01:44 AM
Right on Jama. Thanks. Where did you find those codes?

Pat

Jama
05-12-2002, 02:30 AM
From this great web page;
<a target="_blank" href=http://www.winscriptingsolutions.com/Articles/Index.cfm?ArticleID=15646&pg=4>http://www.winscriptingsolutions.com/Articles/Index.cfm?ArticleID=15646&pg=4</a>
They have some of the best vbscript tutorials I’ve seen on the net. Check it out.

Jama

POBrien
05-12-2002, 02:39 AM
Excellent site! The scripting section is huge.

thanks again,

Pat

sbmtech
05-12-2002, 04:25 AM
Great links! Thank you folks for responding.

Steve