Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7689287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:07:47+00:00 2026-05-31T20:07:47+00:00

I am running a VBScript as a Custom Action at the Commit part of

  • 0

I am running a VBScript as a Custom Action at the Commit part of an MSI installation. The script calls an .exe that installs drivers for a ZB device. What I want to do is check the file system first to see if the drivers are already there and skip the installation if they are.

So far the script looks like this:

Sub Run(ByVal sFile)
Dim shell
    Set shell = CreateObject("WScript.Shell")
    shell.Run Chr(34) & sFile & Chr(34), 1, false
    Set shell = Nothing
End Sub

Set objFSO = CreateObject("Scripting.FileSystemObject")

IF objFSO.fileExists("c:\windows\system32\drivers\ftser2k.sys") THEN
    MsgBox("You already have the drivers installed.")
ELSEIF objFSO.fileExists("c:\windows\system32\ftserui2.dll")  THEN
    MsgBox("You already have the drivers installed.")
ELSE
    Run Session.Property("CustomActionData") & "CDM20600.exe"
END IF

These files do exist on my machine. So if I double click the vbs file I get the MsgBox coming saying that I already have the file. However, when I run the msi installation, no matter what it installs the driver as if the first two conditional statements weren’t even there. I did read that you cannot use the WScript object in MSI, so I took out the WScript.Echo lines and replaced them with MsgBox. I was wondering if maybe you can’t use the FileSystemObject in msi either.

My ultimate goal is not to have any message come up. I just want the driver install to be skipped if the files are present on the system. The messages are there just for debug purposes right now.

If it helps, the msi package was built in Visual Studio 2010. Also the CustomActionData is the TARGETDIR.

I am new to both VBScript and install packages, so please be gentle 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:07:48+00:00Added an answer on May 31, 2026 at 8:07 pm

    I have to be honest, I have many concerns about your proposed solution:

    1) VB/JScript CA’s Suck. I would read the link and take it to heart.

    2) I’ve seen many machines in my career where the FSO was broken.

    3) You’ve hard coded the path to System32 instead of using SystemFolder or System64Folder.

    4) Commit custom actions don’t execute when rollback is disabled.

    5) You are running double out of process with no error logging of the EXE call.

    6) Visual Studio Deployment Projects suck in so many ways that I can’t count. Evidence is that Micrsoft has killed them in Visual Studio 11.

    If it was me, I’d ask if you have to use this EXE to install the driver package or if there’s an INF file to go along with the SYS/DLL files. If so, I’d look at create a WiX merge module that uses the DifxAppExtension. This allows you to encapsulate the behavior of driver installation in a discrete module and then add it to your VDPROJ installer or even better a WiX or InstallShield Limited Edition ( free ) installer.

    Here are several blog articles that should help you understand what I mean:

    Augmenting InstallShield using Windows Installer XML – Certificates

    Augmenting InstallShield using Windows Installer XML – Windows Services

    Redemption of Visual Studio Deployment Projects

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want a CustomAction in VBScript that make the installation cancel after running it.
I'm working on a Classic ASP (VBScript) site that's running on a Windows 2008
Any good utilities out there for verifying VBScript syntax without actually running the script?
I'd like to call caspol from within a script inside a custom action in
I'm running a VBScript that may run under x64 Windows. I need to read
There is a VBScript (.vbs) script that someone made here at my company. It
Running the following vbscript to call svnadmin dump fails (i.e. no dump is being
i'm trying to set up an application capable of running VBScript files from .NET
I'm running a VBScript in SQL Agent but I get a 'Permission Denied' on
I am developing a C# application to automate the running of a legacy VBScript(vbs)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.