Thanks again Shawn. I checked the properties on the Kix32.exe and confirmed it is build 62.Your suggestion was correct. It is definately the training program that is causing some sort of problem that persists even after the training and the kix have been exited. If I start the script, enter a name, and exit without running the training program, the script runs fine each time (i.e. the GETS command prompts for a name). However, if I run the training program, exit, then exit the script and restart, the script no longer functions correctly.
I commented out the code that starts the training and put in a simple DIR command. Now each time I run the script, it pauses and prompts for the username (i.e. works as it should).
The training program is the culprit and must be doing something to the system that causes the GETS script command to fail when the script is ran a second time (and every time after). The training program must be having some sort of conflict with the system that causes subsequent attempts to run the script to fail, but I'm at a loss to figure out what I can do to fix it.
I haven't given up just yet but... Know of any other program out there that will allow me to, prompt for a username, set up a front-end menu system and create a log file of usage activity?
If it will help, here is a copy of the original script I wrote:
; Yellow Page Training launch and log-tracking script
; Don Olsen
; November 15, 2001
; Display the grid and user login info
:Start
color y+/n
BOX(0,0,23,79,single)
color b+/n
BOX(10,25,12,55,double)
color w+/n
at (7, 22) "Please type your name and press Enter"
color g+/n
at (11, 27)
gets $name
If len($name) = 0
goto "Start"
Endif
:Menu
; Display Menu
color y+/n
BOX(0,0,23,79,single)
color b+/n
BOX( 9,25,13,56,double)
color w+/n
at ( 7, 21) "Please select which Training CD to access"
at (10, 27) "1. Yellow Page Training CD 1"
at (11, 27) "2. Yellow Page Training CD 2"
at (12, 27) "X. Exit"
color g+/n
at (12, 27)
get $menuopt
; Find out which option was selected
Select
case $menuopt = 1
$runprogram = "R:\yptrain\cd1\ypstart.exe"
$cdnumber = "YP Training CD1"
case $menuopt = 2
$runprogram = "R:\yptrain\cd2\ypstrt2.exe"
$cdnumber = "YP Training CD2"
case instr("Xx", $menuopt)
quit
case 1
goto "Menu"
EndSelect
; Create and Update Log file
If open(1, "\\apc_web\yp.training$\yptraining.txt", 5) = 0
IF WriteLine(1, $cdnumber + " Started " + @DATE + " " + @TIME + " " + @WKSTA + " " + $name + chr(13) + chr(10)) = 0
$Result = SendMessage("don_olsen", $cdnumber + " accessed on machine " + @WKSTA + " by " + $name)
Else
$Result = SendMessage("don_olsen", "Unable to write to YP.Training log file on Machine " + @USERID + "/" + @WKSTA)
Endif
$Result = Close(1)
else
$Result = SendMessage("don_olsen", "Unable to open YP.Training log file on Machine " + @USERID + "/" + @WKSTA)
endif
shell $runprogram
; Update Log file
If open(1, "\\apc_web\yp.training$\yptraining.txt", 5) = 0
IF WriteLine(1, $cdnumber + " Exited " + @DATE + " " + @TIME + " " + @WKSTA + " " + $name + chr(13) + chr(10)) = 0
$Result = SendMessage("don_olsen", $cdnumber + " exited on machine " + @WKSTA + " by " + $name)
Else
$Result = SendMessage("don_olsen", "Unable to write to YP.Training log file on Machine " + @USERID + "/" + @WKSTA)
Endif
$Result = Close(1)
else
$Result = SendMessage("don_olsen", "Unable to open YP.Training log file on Machine " + @USERID + "/" + @WKSTA)
endif
goto "Menu"