ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Wshshell / VB direction question (https://www.excelbanter.com/excel-programming/299303-wshshell-vbulletin-direction-question.html)

Steve[_58_]

Wshshell / VB direction question
 
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.

kkknie[_98_]

Wshshell / VB direction question
 
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
-------------------


--
Message posted from http://www.ExcelForum.com


steve

Wshshell / VB direction question
 
Thanks man, this helps. . .



-----Original Message-----
From what I've come across with similar projects is that

most Setup
programs have a way to select everything with

keystrokes. In the past,
I have run through the setup using the keyboard only and

mimicked them
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 setup
based on the user's current configuration. You can look

at which tab
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 radio
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")
Loop
--------------------



---
Message posted from http://www.ExcelForum.com/

.


Andrew Cushen

Wshshell / VB direction question
 
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
==============================================
-----Original Message-----
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.
.



All times are GMT +1. The time now is 04:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com