Wshshell / VB direction question

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I know this may not be the place to ask this but here
goes. .

I am wanting to script a setup.exe via wshshell commands.
I know how to send keystrokes to a setup window but I
don't know how to choose say a radio button on the setup
window or enter text into a dialog box or click on a
particular button in the box. Any direction for how to get
these answers would be appreciated.
 
From what I've come across with similar projects is that most Setu
programs have a way to select everything with keystrokes. In the past
I have run through the setup using the keyboard only and mimicked the
in a .wsh file. Basically, you end up with a whole lot of tabs...

Results may vary since some setups may skip certain things in the setu
based on the user's current configuration. You can look at which ta
of the setup is open using AppActivate and I'll attach a code snippet.

As for your actual question, I cannot think of a way to select a radi
button or checkbox.

K


Code
-------------------
Set WSS251 = CreateObject("Wscript.Shell")
WSS251.Run PE251CD & "Setup.exe",1,TRUE
Do Until WSS251.AppActivate("Welcome")
Loop
WSS251.SendKeys "~"
Do Until WSS251.AppActivate("Software License Agreement")
Loop
WSS251.SendKeys "~"
Do Until WSS251.AppActivate("Enter User Information")
Loop
WSS251.SendKeys " "
WScript.Sleep 100
WSS251.SendKeys "PLANT"
WScript.Sleep 100
WSS251.SendKeys "{TAB}"
WSS251.SendKeys "Joe Bob Inc."
WSS251.SendKeys "{TAB}"
WSS251.SendKeys "{TAB}"
WSS251.SendKeys "~"
Do Until WSS251.AppActivate("Enter License Keys Disk")
Loop
WSS251.SendKeys "{TAB}"
WSS251.SendKeys "{TAB}"
WSS251.SendKeys "~"
Do Until WSS251.AppActivate("Choose Directory")
Loo
 
Once you've sent enough Tabs to move the focus to the
radio button or checkbox you want, try sending a SPACE
(spacebar press).

-Andrew
==============================================
 

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