Printer driver setup.exe program
I have a printer driver from www.flex-systems.com in the form of a setup.exe. It is required to run this setup to install the printer driver and their instructions explictly state that "Trying to install the printer drivers in any other way will result in an erroneous installation" unless you run their setup.exe. You are also required to input a serial/product number in order to run the install. I'm thinking the best way to manage this is to just run a vb script since silent installation is not required but prepopulating the serial key in the input field is. I have a script to launch the program and click the next button and this is where it breaks down. The next screen has the serial field but it is not activated with the cursor so I can't send key strokes to it and I don't know how to make it active without manually clicking in it.
Here is what I have so far:
Set WshShell = WScript.CreateObject("WScript.Shell")
' run setup
WshShell.Run "setup.exe"
' wait for program to load
WScript.Sleep 500
' send the 'enter' key to advance to second screen
WshShell.SendKeys "{ENTER}"
Need command here to activate product key field
' send Serial Number keys
WshShell.SendKeys "########"
Suggestions?
Here is what I have so far:
Set WshShell = WScript.CreateObject("WScript.Shell")
' run setup
WshShell.Run "setup.exe"
' wait for program to load
WScript.Sleep 500
' send the 'enter' key to advance to second screen
WshShell.SendKeys "{ENTER}"
Need command here to activate product key field
' send Serial Number keys
WshShell.SendKeys "########"
Suggestions?
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
anonymous_9363
16 years ago
Ignore their bleatings about erroneous installation: there's nothing they're doing in that EXE that can't be done via an MSI with Custom Actions, WiseScript or whatever.
Having said that, if you *really* want a bodged job, how about WSShell.SendKeys {TAB} the requisite number of times to tab to the relevant text-box?
Having said that, if you *really* want a bodged job, how about WSShell.SendKeys {TAB} the requisite number of times to tab to the relevant text-box?
Posted by:
bkelly
16 years ago
If you want to automate the interactive installation like this, VBScript can be pretty limiting. AutoIt is a free scripting language created just for this task. They even provide it as a COM component (AutoItX.dll) so that you can make use of its functionality from VBScript if you wish. In your scenario you could use it to:
- Run the setup
- Look for the initial screen by title (rather than guessing how long to wait)
- Actually initiate a click event on the "Next" button (instead of enter, which if someone is sitting at the comptuer may be incorrect)
- Provide the product key to the product key field of the form directly (no tabbing to find it)
It is fairly easy to use and well documented. Have a look:
http://www.hiddensoft.com/autoit3/downloads.php
- Run the setup
- Look for the initial screen by title (rather than guessing how long to wait)
- Actually initiate a click event on the "Next" button (instead of enter, which if someone is sitting at the comptuer may be incorrect)
- Provide the product key to the product key field of the form directly (no tabbing to find it)
It is fairly easy to use and well documented. Have a look:
http://www.hiddensoft.com/autoit3/downloads.php
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.