473,624 Members | 1,993 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to determine the location of install files

JDS
I am using a setup project and Windows Installer to deploy my
application and have some additional code in custom actions. In this
code I need to refer to one of the install files but I cannot find how
to determine the path. For example, if the install CD is in the d:
drive and the user runs d:\setup.exe I want to know that it has been
run from d: (rather than e: or any other location) so that I can build
up the path to one of the folders on the CD.

I do not want to copy the file as part of the installation because it
is large and not required once installation is complete.

Can anyone help?
Dec 15 '07 #1
4 2118


"JDS" wrote:
I am using a setup project and Windows Installer to deploy my
application and have some additional code in custom actions. In this
code I need to refer to one of the install files but I cannot find how
to determine the path. For example, if the install CD is in the d:
drive and the user runs d:\setup.exe I want to know that it has been
run from d: (rather than e: or any other location) so that I can build
up the path to one of the folders on the CD.

I do not want to copy the file as part of the installation because it
is large and not required once installation is complete.

Can anyone help?
If you select the action to install your application and look at the
properties of it you can see the following property: CustomActionDat a Here
you type:/INSTALLDIR="[TARGETDIR]". In your installer class you can get the
parameter: Context.Paramet ers.Item("TARGE TDIR"). This is how I find files in
the target directory. I believe the SOURCEDIR is what you want.
Dec 15 '07 #2
JDS
On 16 Dec, 12:52, Family Tree Mike
<FamilyTreeM... @discussions.mi crosoft.comwrot e:
Is your custom code (DLL) referenced within the install and commit phases?
Even if you don't do an "install" action, but just a "commit" as I usually
do, you need to do this. I got similar errors. I got errors during both
types of installs though.

I suspect then that when repairing, it does something slightly different
than when installing. I don't have any of my install projects here at home.
I will try to diagnose from my office computer at the next opportunity.- Hide quoted text -

- Show quoted text -
Yes, I only have code for commit. However, I tried adding a reference
to the install and still the same error on repair.

I have a form in my class (frmPostInstall ) and all I have done in the
install action is to declare a new dummy form and then set it to
Nothing as follows:

Public Overrides Sub Install(ByVal stateSaver As
System.Collecti ons.IDictionary )
Dim DummyForm As New frmPostInstall
Try
MyBase.Install( stateSaver)
DummyForm = Nothing
Catch ex As Exception
MsgBox("Custom action error on install: " & ex.Message)
End Try
End Sub

I don't know if this should be sufficient.

Thanks for your help.
Dec 16 '07 #3


"JDS" wrote:
On 16 Dec, 12:52, Family Tree Mike
<FamilyTreeM... @discussions.mi crosoft.comwrot e:
Is your custom code (DLL) referenced within the install and commit phases?
Even if you don't do an "install" action, but just a "commit" as I usually
do, you need to do this. I got similar errors. I got errors during both
types of installs though.

I suspect then that when repairing, it does something slightly different
than when installing. I don't have any of my install projects here at home.
I will try to diagnose from my office computer at the next opportunity.- Hide quoted text -

- Show quoted text -

Yes, I only have code for commit. However, I tried adding a reference
to the install and still the same error on repair.

I have a form in my class (frmPostInstall ) and all I have done in the
install action is to declare a new dummy form and then set it to
Nothing as follows:

Public Overrides Sub Install(ByVal stateSaver As
System.Collecti ons.IDictionary )
Dim DummyForm As New frmPostInstall
Try
MyBase.Install( stateSaver)
DummyForm = Nothing
Catch ex As Exception
MsgBox("Custom action error on install: " & ex.Message)
End Try
End Sub

I don't know if this should be sufficient.

Thanks for your help.
Bummer...

I got to work and tested a solution similar to what we are discussing, and
get the same error that you describe when I run the repair mode on my app. I
thought I had mine running. I will continue working this and if I find
anything, post back here. There must be some easy fix to this, you would
think...
Dec 17 '07 #4
JDS
On 17 Dec, 14:32, Family Tree Mike
<FamilyTreeM... @discussions.mi crosoft.comwrot e:
Bummer...

I got to work and tested a solution similar to what we are discussing, and
get the same error that you describe when I run the repair mode on my app. I
thought I had mine running. I will continue working this and if I find
anything, post back here. There must be some easy fix to this, you would
think...- Hide quoted text -

- Show quoted text -
Yes, you'd think ....

Thanks for having a look at this. Don't worry about progressing on my
account as the repair option is not really going to be that useful on
my app anyway and I will just include instructions to remove first if
it ever comes to that. However, it seems frustrating that it behaves
this way and I'm sure it will help someone else if there was an
answer.

Thanks again for your help.
Dec 18 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2188
by: Allan Cammish | last post by:
I am writing a web based application that uses an ActiveX control on a web page to install files on the user's computer. These files will then be opened using programs on the user's computer such as WordPad. Some of the files will be also executed and delete the files which are not longer required. The files are not meant to be permanently left on the users computer, so there are by definition ‘temporary' files but will need to survive...
1
2055
by: Andork | last post by:
Can anyone tell me how to dirrect the IIS installation to an other drive or how to manually move all related files to an other drive? I think I can menage the sites, but NNTP and SMTP I can't see where.
3
1907
by: Web Webon | last post by:
Hi everybody! I wonder if this is possible? I need to determine if a client is using "windows classic folders" or anything else. If I instantiate a Shell ActiveX object is there a way of obtaining this information from javascript? (I know that the user will get prompted about allowing such an operation, but I am willing to live with this). Because of the way one of my pages work, I need to know this information in order to "cover up"...
1
14083
by: ImageAnalyst | last post by:
In my setup/installer for my solution, I get several warnings: Warning 16 Two or more objects have the same target location ('\interop.shell32.dll') Warning 18 Two or more objects have the same target location ('\interop.comctl2.dll') Each of these files shows up twice in the list of files to install. What is happening is that the setup project wants to install these files in the Application Folder of my target system and it has two
2
2439
by: Bill | last post by:
I have an Access 2003 database application that I split into an application component MDB file (i.e., forms, etc) and a data component MDB file (i.e., tables, etc.). I used the 2003 developer extensions Package Wizard program to create an installation package. (Note: I included the Access 2003 runtime because the users of my application don't have Access on their machines). My problem is that when a user runes the installation program,...
8
1929
by: rdemyan via AccessMonster.com | last post by:
Anyone have any ideas on how to determine when the back-end file (containing only tables) has been updated with new data. The date/time of the file won't work because it gets updated to the current date/time when the back-end file is compacted. I'm just looking for an easy way to determine when there has been a change to data in any table in the back-end file. Maybe something is updated in one of the system tables??
1
6104
by: phrankbooth | last post by:
Hi, New to windows services, but I've managed to create one and install it successfully. However, I'm confused about what the InstallUtil actually does. I'm not sure if it just registers and configures the service files (exe, dll, config, etc...) as a service or if it copies to a special location like the GAC and runs it all from there, or if the original location of the files is the actual location even after the InstallUtil is done.
14
5728
by: Keith | last post by:
I have an MDE application used by several hundred people in different parts of the world. The majority of users are of lesser experience computer experience. The app consists of a frontend (MDE) and backend (MDB), a help file and a key file. To this point, I have provided users with an installation package which installed both files into their program files folder with no problems. A few users are getting new computers with vista...
12
1755
by: vidishasharma | last post by:
Hi, I want to get the location which user selects for installaion of program using msi installer. I require this to do kind of cleanup activity if something goes wrong with the installation. Regards, Vidisha
0
8236
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8173
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8679
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8621
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8475
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.