microsoft, visual basic, 6.0, trying to create a working  CAB install file, invalid command line.patrameters. Unable to continue.

Posted on 2007-08-05
Last Modified: 2013-11-05
I have a VB6 project, processed by the Package & Development wizard. I unzip the CAB contents, then try to run the SETUP1.exe. Get the message "invalid command line parameters. . Unable to continue." (I can execute the unzippwd program, which accesses an unzipped data file) But I'd like to have potential bvuyers be able to download the app, and install it as simply as possible.
Question by:ADenney
    LVL 18

    Accepted Solution

    Why do you unzip cab? You should not do that, setup.exe will do it for you. You should also forget about using Package and Deployment Wizard and use Microsoft Visual Studio Installer. Its free, has much more professional look, and with many advanced options.

    LVL 14

    Expert Comment


    You should not to run the Setup1.exe, instead run the Setup.exe

    Vb 6.0 B&D made setup project has files: Setup.exe the and setup.lst these should be in same folder, don't try to unpack the cab.

    LVL 27

    Expert Comment

    Here is how PDW works:
    Setup.exe unzip cab file into temp folder, read and validate .lst file and then call Setup1.exe with some some command-line parameters (see
    Investigation of Setup1.exe (located at VSPath\Wizards\PDWWizard\Setup1 folder) give following:
    'module=basSetup1.bas, function ProcessComandLine
        strSrcPath = strExtractFilenameArg(strCommand, fErr)
        If fErr Then GoTo BadCommandLine
        strAppRemovalLog = strExtractFilenameArg(strCommand, fErr)
        If fErr Then GoTo BadCommandLine
        strAppRemovalEXE = strExtractFilenameArg(strCommand, fErr)
        If fErr Then GoTo BadCommandLine
    So, it should be at least 3 command line arguments for Setup1.exe
    <QUOTE>    ' We expect to find the source directory,
        ' name/path of the logfile, and name/path
        ' of the app removal executable, separated only by
        ' spaces  </QUOTE>
    There can be also fourth element (BTW, not widely documented by MS) - silent installation switch with silent logfile path

    So, correct call to Setup1.exe is
    Setup1.exe "C:\Temp\" "install.log" "uninstall.exe"
    Setup1.exe "C:\Temp\" "C:\Temp1\install.log" "C:\Temp2\uninstall.exe"
    All these 3 cmd parameters are created by Setup.exe and bypass to Setup1 automatically

    For silent installation:
    via setup.exe:
    setup.exe /s c:\anylogfilename.log
    via setup1
    setup.exe /s c:\anylogfilename.log C:\Temp install.log uninstall.exe

    Note: quotes in file names/path required if they contain spaces


    Author Comment

    okay so far.. When I run the PDW, it generates:

    Does the user have to download all three, and then run setup? Is there anyway to create one module which will  install the program?
    LVL 27

    Expert Comment

    Yes, setup require all 3 files. There are some ways of work around
    1. Run setup.exe directly from web link - in this case all 3 filse must be placed in 1 folder at web server
    2. Use self-extracting zip/rar - they allow start setup.exe after extracting into temp folder
    3. Use third party setup tool, like InnoSetup, InstallShield, Wise Install etc.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    thread-safe code in c++ 2 58
    countAbc challenge 9 35
    nestparen challenge 4 33
    strDist challenge 35 69
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    This is about my first experience with programming Arduino.
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now