/build/static/layout/Breadcrumb_cap_w.png

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


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)

Posted by: anonymous_9363 15 years ago
Red Belt
2
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:Dim objShell
Dim intIndex
Dim intNbrofNextButtonsINeedToPress

Set objShell = Createobject("wscript.shell")

For intIndex = 1 To intNbrofNextButtonsINeedToPress
objShell.SendKeys "{TAB}"
Next
Posted by: bkruiser 15 years ago
Orange Belt
0
objShell.SendKeys "{TAB}"
Posted by: anonymous_9363 15 years ago
Red Belt
0
...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.
Posted by: abking99 15 years ago
Second Degree Blue Belt
0
Hi.
VBScab, I know that we can install drivers, through dpinst.exe, the same command was working fine on my home xp image. It was not giving any prompt, and was directly installing drivers silently. On my project image it was giving prompt, so choose this way.
Posted by: abking99 15 years ago
Second Degree Blue Belt
0
I have done some packages in past, but not for any project. Just for practice. So I just knew that, we can use dpinst.exe to install drivers. From next time I will definitely investigate as you have mentioned.
Posted by: bkruiser 15 years ago
Orange Belt
0
your rough... correct, but rough
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ