Send keystrokes in vbscript
Hi,
below is my code: I am trieng to install some driver through vbscript. At the time of driver installation, it asks for 2 options: continue anyway/stop installation. By default it is stop installation selected. So when my script runs, stop installation gets selected. How can i change it to continue installation? through vbscript? I tried to use tab key nut it is giving me compilation error
below is my code: I am trieng to install some driver through vbscript. At the time of driver installation, it asks for 2 options: continue anyway/stop installation. By default it is stop installation selected. So when my script runs, stop installation gets selected. How can i change it to continue installation? through vbscript? I tried to use tab key nut it is giving me compilation error
Dim strprog
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set objshell = Createobject("wscript.shell")
strprog = objshell.expandenvironmentstrings("%programfiles%")
strdpinst = strprog & "\SysGillo\{340993ff-43ea-4752-8edb-252d83ed6d0f}\DPInst.exe"
msgbox strdpinst
Command = chr(34) & strprog & "\SysGillo\{340993ff-43ea-4752-8edb-252d83ed6d0f}\DPInst.exe" & chr(34) & " /F /SW /LM"
msgbox Command
objshell.run Command
WScript.Sleep 5000
objShell.SendKeys {TAB}
objShell.SendKeys "~"
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
anonymous_9363
15 years ago
If you had read anything on the subject, you would have discovered that the prompt arises because the driver being installed isn't signed. Sign the driver (or, better, get the driver supplier to sign it) and the problem goes away.
Still, the half-arsed TAB-pressing is SOOOOOOOOO much more professional. Hey! Actually, this is brilliant! Why bother with creating response transforms for MSIs when you can have a script like this:
Still, the half-arsed TAB-pressing is SOOOOOOOOO much more professional. Hey! Actually, this is brilliant! Why bother with creating response transforms for MSIs when you can have a script like this:
Dim objShell
Dim intIndex
Dim intNbrofNextButtonsINeedToPress
Set objShell = Createobject("wscript.shell")
For intIndex = 1 To intNbrofNextButtonsINeedToPress
objShell.SendKeys "{TAB}"
Next
Posted by:
anonymous_9363
15 years ago
...which neatly avoids pointing out that there exists a perfectly good methodology for using DPInst to install drivers, a sticky for which appears at the top of the 'Package Development' forum. Additionally, there are a gazillion posts in that same forum on the subject.
But then, this poster seems determined to:
- not use AppDeploy's Search facility;
- not use a search facility of any kind;
- avoid reading anything, certainly not any previous posts on the same subject;
- find the most complicated way of achieving his goals; and finally
- not take advice.
But then, this poster seems determined to:
- not use AppDeploy's Search facility;
- not use a search facility of any kind;
- avoid reading anything, certainly not any previous posts on the same subject;
- find the most complicated way of achieving his goals; and finally
- not take advice.
Posted by:
abking99
15 years ago
Posted by:
abking99
15 years ago
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.