?
Solved

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
5
Medium Priority
?
2,599 Views
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.
0
Comment
Question by:ADenney
5 Comments
 
LVL 18

Accepted Solution

by:
Priest04 earned 2000 total points
ID: 19635760
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.

Goran
0
 
LVL 14

Expert Comment

by:Matti
ID: 19636844
Hi!

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 yorapp.cab and setup.lst these should be in same folder, don't try to unpack the cab.

Matti
0
 
LVL 28

Expert Comment

by:Ark
ID: 19636876
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 http://support.microsoft.com/kb/q189738/)
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"
or
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

Ark
0
 

Author Comment

by:ADenney
ID: 19657571
okay so far.. When I run the PDW, it generates:
setup.exe
setup.lst
mypaogram.cab

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

Expert Comment

by:Ark
ID: 19658255
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.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Loops Section Overview

862 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