Jump to content

Recommended Posts

Posted

Alright, I've got a few program that don't like to silently install very well so I've made a couple VBscripts to at least automate the process. The problem is that the scripts won't start the setup programs because they can't find the file to run. The really strange thing is that if I run the script with Windows loaded they run fine, but when called from my inf file I get the file not found error. Here's an example script for Avant Browser:

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run app & "absetup.exe"
WScript.Sleep 2500
WshShell.SendKeys "{ENTER}"
WScript.Sleep 500
WshShell.SendKeys "{ENTER}"
WScript.Sleep 500
WshShell.SendKeys "{ENTER}"
WScript.Sleep 500
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 5000
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000

I could use an absolute path to the file but I'm trying to install all of my programs from the CD so the driver letter isn't always going to be the same. Is there a way pass a variable from an inf file to the vbscript?


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...