Re: VS 2005 Setup Project: Howto determine startup path of setup.e



Hello Phil,

my "normal" setup of course does the registrations itself. The first setup
runs on the server and installs (and registers) the DLLs let's say in
c:\dir1. This target directory is shared as network share let's say as
\\server\dir1 and some clients use the DLLs over the network share. The
second setup is placed by the first setup also in that network share. Its
purpose is to be run by the clients, create a FullTrust codegroup and
register the DLLs on the client. Of course I could this also do writing a
batch file with caspol and regasm calls but I prefer to have a setup.
Concerning this topic, you might take a look at my other
post:http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.vsnet.setup&p=1&tid=ebcfad22-a195-459e-8108-65ea47fbbf83&mid=ebcfad22-a195-459e-8108-65ea47fbbf83

Thanks,
dpomt
"Phil Wilson" wrote:

Is there some reason why you can't just set the Register property of the
assemblies in the Setup project and have Visual Studio just register them
for you automatically?
--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"dpomt" <dpomt2@xxxxxxxxxxxxx> wrote in message
news:6807CA88-842D-41B2-BAEA-85DB9871D122@xxxxxxxxxxxxxxxx
I am implementing a setup project that has two tasks:
1) Create Codegroup with FullTrust
2) Register assemblies available in same directory where setup has been
started (using RegistrationServices.RegisterAssembly)
Sample:
\\server\share1\setup.exe
\\server\share1\my_setup.msi
\\server\share1\mydll1.dll
\\server\share1\mydll2.dll
\\server\share1\mydll3.dll
--> setup.exe should register each of the three dlls that are in the same
folder (network share) as the setup.exe itself.


I have added a custom action and implemented a class derived from
Installer
to accomplish the two tasks.
The custom action action is executed and the codegroup is created as
expected.
For the registration of the assemblies, I need to find out the path where
setup.exe has been started.
I have tried using
- Context.Parameters["assemblypath"] ==> target dir
- AppDomain.CurrentDomain.BaseDirectory ==> c:\window\system32
but none of the two gave me the directory where the setup has been
launched
from.

Any ideas howto get that information from within my installer class?

Thanks,
dpomt




.



Relevant Pages

  • Re: Installing Assemblies and Registering OCX
    ... If you start a setup project and just ... create folders off Application Folder you'll see how it works. ... Registering an OCX - the file properties have a Register property. ... Phil Wilson [MVP Windows Installer] ...
    (microsoft.public.vsnet.setup)
  • Re: file installation order
    ... > Definitive Guide to Windows Installer ... >> modules in the setup file to copy these necessary libraries to the user's ... >> I of course need to register the OCXs when installing, ...
    (microsoft.public.dotnet.framework.setup)
  • Re: Want to run an application without installing it.
    ... Maybe whoever designed the program only wanted it to be installed by the installer. ... demands the associated DLLs and their corresponding Manifests, ... I have copied respective DLLs in my local folder instead of placing ... I have successfully register Dlls found in system32 after placing them ...
    (microsoft.public.vc.mfc)
  • Re: Want to run an application without installing it.
    ... If the app was designed to used with an installer, you are going to have trouble just ... The DLL not found is a common error caused by not having the DLLs in the right folder. ... I have successfully register Dlls found in system32 after placing them ...
    (microsoft.public.vc.mfc)
  • Re: file installation order
    ... In the VS setup project, in the properties of those OCXs, what was your ... Register property set to? ... MSI file and the OCX copied to the system, ... Definitive Guide to Windows Installer ...
    (microsoft.public.dotnet.framework.setup)