Two queries please.

  • Thread starter Thread starter John O'Boyle
  • Start date Start date
J

John O'Boyle

First. Is there any way to get up a program to execute only once each
day, specifically at the first power-on? Sort of like putting it in the
Startup folder, but this would be a Once-per-day folder.

Second. Does anyone have a definitive guide to character sizing within
each of the WinXP appearance items? If I make my icon titles one size,
that seems to affect certain dialog boxes that I DON'T want to change,
and vice-versa. Some fonts are displayed too small for my old eyes, and
others are fine. I KNOW I'm supposed to figure this out from the
display properties appearance tab, but I guess I just don't get it.

Thanks.

JLOB
 
I'll let someone else answer the scheduling problem.
As for the Appearance elements: yes, some of them are going to change in
lockstep, and some sort of compromise may have to be worked out.
Are you having difficulty changing the font size of a certain element? Let
us know which one.
Also, please note that the small, 8-pt. type found in dialog boxes is,
according to David Candy, hard-coded and not subject to modification. For
example, the Display Properties pop-up window is a dialog box. These can be
hard to read. Do you have a pair of "computer bifocals?" They are a must.
 
John said:
First. Is there any way to get up a program to execute only once each
day, specifically at the first power-on? Sort of like putting it in the
Startup folder, but this would be a Once-per-day folder.
Hi

Here is a VBScript (.vbs file) that will only launch the file
"c:\my test\test.txt" in Notepad once a day. Put the .vbs file
in the Startup folder, and change the Run command to the program
you want to start.


'--------------------8<----------------------
newdate = Date

Set oShell = CreateObject("WScript.Shell")

olddate = "2000-01-01" ' init value in case no reg value exist.
On Error Resume Next
olddate = oShell.RegRead("HKLM\SOFTWARE\Mine\PrevDate")
On Error Goto 0
oShell.RegWrite "HKLM\SOFTWARE\Mine\PrevDate", newdate, "REG_SZ"

If DateDiff("d", olddate, newdate) > 0 Then
oShell.Run "notepad.exe ""c:\my test\test.txt"""
End If
'--------------------8<----------------------


WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp
 
John said:
Torgeir,

Thanks for the VBS script. I don't know much, if anything. about VB,
but I guess I need to learn. It didn't work the way I wanted it to, but
that's gotta be my fault somehow. I DID get it to work using another
file/program, and I think I've even figured out how to have it execute
every time BUT the first time, for use in another application.

I'd like to know what I need to change in order to have two, or possibly
three, of these scripts in the startup group and NOT trip over identical
reg values.

Instead of having several scripts, run several programs from one script,
like this:

oShell.Run "prog1.exe"
oShell.Run "prog2.exe"
oShell.Run "prog3.exe"

I've also included MY (non working version of the) script, and an
example of the error I get each and every time. I've tried it with just
the program name, just the file name, and also with both, as was your
example. No joy. Each of these three attempts worked fine when run
from "Start/Run".

When I get it working, it's gonna do EXACTLY what I've been looking for.
I REALLY appreciate your help.

As you have spaces in the path, you need to surround it with quotes:

oShell.Run """C:\My Documents\Calendar Data\JLOB.CC3"""

(inside a quoted string, you need to use two quotes to get one
effective)
 
John said:
Torgeir,

Thanks. That's really slick. Gotta learn more about this VBS.
Hi,

Here are some WSH starting points:

Welcome to the Script Center
http://www.microsoft.com/technet/scriptcenter/default.mspx

The updated Portable Script Center (v3.0), the *.chm version of all of
the sample scripts on the TechNet Script Center site...

Download details: System Administration Scripting Guide Scripts
http://www.microsoft.com/downloads/...familyid=b4cb2678-dafb-4e30-b2da-b8814fe2da5a


For a list of some scripting resources and links to some Windows Script
Host (WSH) Web introductions, take a look here:

http://groups.google.co.uk/[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top