VBScript program using WshShl.Run "Calc" works in windows 2000 but not in winXP

Following is a math game my scripting/programming class is entering. The caluculaor buttons show that they are pressed in win2000 but in winXP you only see the reults in the display. Can anyone tell me what I need to do different for calc in XP?

Hint: You need to enter the wrong answer to get the calc, so for once in your math life, make a mistake.

'*************************************************************************
'Script Name: Mathgame.vbs
'
'Description: This script prompts the user to solve a mathematical
'expression and demonstrates how to solve it in the event that the user
'cannot
'*************************************************************************

'Initialization Section

Option Explicit

Dim WshShl, QuestionOne, Proveit

'Define the title bar message to be displayed in the script's
'pop-up dialog
Const cTitlebarMsg = "The Math Game"

'Instantiate an instance of the WshShell object
Set WshShl = WScript.CreateObject("WScript.Shell")

'Present the player with the equation
QuestionOne = InputBox("What is the sum of 1 + 5 * 9 / 3 ?", cTitlebarMsg)

'See if the player provided an answer
If Len(QuestionOne) = 0 Then
  MsgBox "Sorry. You must enter a number to play this game."
  WScript.Quit
End If

'Make sure that the player typed a number
If IsNumeric(QuestionOne) <> True Then
  MsgBox "Sorry. You must enter a number to play this game."
  WScript.Quit
End If

'Check to see if the player provided the correct answer  
If QuestionOne = 16 Then
  MsgBox "Correct! You obviously know your math!"
Else
  ProveIt = MsgBox("Incorrect. Do you want to see me solve the " & _
  "equation?", 36, cTitlebarMsg)

  If ProveIt = 6 Then 'Player wants to see the solution
 
    'Start the WordPad application
    WshShl.Run "WordPad"

    'Pause script execution to give Windows enough time to load WordPad
    WScript.Sleep 2000

    'Use WordPad to show the player how to solve the equation

    WshShl.SendKeys "To answer this question you must follow the " & _
      "correct order of precedence when performing your calculations."

    WScript.Sleep 2000
    WshShl.SendKeys "~~"
    WshShl.SendKeys "1st, working from left to right multiply 5 * 9."
    WScript.Sleep 2000
    WshShl.SendKeys "~~"
    WshShl.SendKeys "2nd, divide the result by 3."
    WScript.Sleep 2000
    WshShl.SendKeys "~~"
    WshShl.SendKeys "3rd, add 1."
    WScript.Sleep 2000
    WshShl.SendKeys "~~"
    WshShl.SendKeys "The final answer is 16."
    WScript.Sleep 2000
    WshShl.SendKeys "~~"
    WshShl.SendKeys "~~"
    WshShl.SendKeys "In case you question my math..... watch this!"
    WScript.Sleep 2000
    WshShl.SendKeys "%{F4}"
    WshShl.SendKeys "%{N}"

    'Start the Calculator application
    WshShl.Run "Calc"

    'Use the Calculator application to solve the equation
    WScript.Sleep 2000
    WshShl.SendKeys 5 & "{*}"
    WScript.Sleep 2000
    WshShl.SendKeys 9
    WScript.Sleep 2000
    WshShl.SendKeys "~"
    WScript.Sleep 2000
    WshShl.SendKeys "{/}" & 3
    WScript.Sleep 2000
    WshShl.SendKeys "~"
    WScript.Sleep 2000
    WshShl.SendKeys "{+}" & 1
    WScript.Sleep 2000
    WshShl.SendKeys "~"
    WScript.Sleep 2000
    WshShl.SendKeys "%{F4}"
  End If
End If
rivercityAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sr75Commented:
I ran your script to see what you were talking about,  You want to get the calculator buttons to be shown as being pushed like they usually are in Windows 2000?

Well, XP's calc doesn't push the buttons when you use the keyboard to enter in the numbers.  So I don't think it is programically possible using the sendkeys method or any other method with vbscript.  Its the calc program itself that is the issue, not the script you are using.
dasmcseCommented:
Rivercity,
I have XP Sp2 and your script works perfectly from wcscript and cscript. You may want to check your XP installation make sure it's up to date.
grayeCommented:
.... so just copy the calc.exe from Win2k and copy it somewhere on the WinXP box (don't overwrite the original).   Then modify the script to use the path to the older version of calc.exe
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

mackengaCommented:
graye: I'm unsure if that will work; I'm under the impression that calc.exe is the same in both cases anyway.  The difference is the way Windows shows the buttons.

I can't try it since I'm in the stone age and haven't got an XP box on my network, but I suggest trying swiching themes in XP - maybe you'll see the buttons move if you're in the Windows Classic style.  I can't test it, but if copying over calc doesn't work this must be worth a try.

Hope this helps.
Shane Russell2nd Line Desktop SupportCommented:
If you that badly want to make the buttons appear to be moving how you want ( and you have a programming enviroment of some description ( Even vb 2005 ) or something like that. why not make your own calculator with buttons that move ?
grayeCommented:
Yep, it works... I just copied the CALC.EXE from Win2k to WinXP, and when I press a number key on the keyboard, it flashes on the calculator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.