Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Setup project command line arguments
I have created a Setup Project using Visual Basic .NET.
I have no problem to create an installer copying my .exe into a specific dir
ectory and also to write into registries.
BUT I don't know how can I read command line arguments.
I must absolutely read the command line arguments and use this arguments for
 my installation.

Does anyone have an idea?

Thanks a lot
Trinidad.

Report this thread to moderator Post Follow-up to this message
Old Post
Trinidad
01-03-05 11:51 AM


Re: Setup project command line arguments
I'm not sure what you mean - the exe is a wrapper generated by Visual
Studio, and I don't know if you can pass command line arguments into it that
you can use. If you just create an MSI file, you can run it with a command
line such as:
msiexec /i <path to your msi> MYPROPERTY=something
and then the property MYPROPERTY can be referenced during the setup, in
conditions for installing files etc.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"Trinidad" <Trinidad.1iafto@mail.codecomments.com> wrote in message
news:Trinidad.1iafto@mail.codecomments.com...
>
> I have created a Setup Project using Visual Basic .NET.
> I have no problem to create an installer copying my .exe into a
> specific directory and also to write into registries.
> BUT I don't know how can I read command line arguments.
> I must absolutely read the command line arguments and use this
> arguments for my installation.
>
> Does anyone have an idea?
>
> Thanks a lot
> Trinidad.
>
>
>
> --
> Trinidad
> ------------------------------------------------------------------------
> Posted via http://www.codecomments.com
> ------------------------------------------------------------------------
>



Report this thread to moderator Post Follow-up to this message
Old Post
Phil Wilson
01-05-05 08:59 PM


Re: Re: Setup project command line arguments
The problem is my Setup.exe will be called from another existing application
.
This application will call "Setup.exe param1" and I cannot change the way th
is application will call my Setup.exe.

I will like to know if there is a way to read this entry parameter (param1) 
into my Setup program. 
Is there something I can change with a Custom Action?

The only solution I have found until know is to use an intermediary project 
that will analyze the command line parameter and save it into a registry. Th
en this project calls the Setup.exe without parameters.
Into the Setup project I add a Custom Action reading the parameter stored in
to the registry and then making the needed actions.
Do you think this is a good and only solution?

Thank you very much for your help

Trinidad Martinez.

Report this thread to moderator Post Follow-up to this message
Old Post
Trinidad
01-14-05 04:41 PM


Re: Re: Re: Setup project command line arguments
TO get command line arguments in .net use the command function

This example uses the Command function to return the command-line arguments 
in an object containing an array.

Function GetCommandLineArgs() As String()
   ' Declare variables.
   Dim separators As String = " "
   Dim commands As String = Microsoft.VisualBasic.Command()
   Dim args() As String = commands.Split(separators.ToCharArray)
   Return args
End Function

Report this thread to moderator Post Follow-up to this message
Old Post
ajb2222
02-11-05 09:49 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Studio archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:37 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.