![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How to get the location where user ask msi to install the application 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 |
My System Specs![]() |
| | #2 (permalink) |
| | RE: How to get the location where user ask msi to install the applicat That is [TARGETDIR]. "vidishasharma@xxxxxx" wrote: Quote: > 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 > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How to get the location where user ask msi to install theapplicat Yes I tries that thanks for answering However I want both / SrcDir="[SourceDir]\" and /TrgDir="[TARGETDIR]\" however when I give /SrcDir="[SourceDir]\" , /TrgDir="[TARGETDIR]\" for my custom action it does not work. How can I get both. |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How to get the location where user ask msi to install the appl /SrcDir="[SourceDir]\" /TrgDir="[TARGETDIR]\" "vidishasharma@xxxxxx" wrote: Quote: > Yes I tries that thanks for answering However I want both / > SrcDir="[SourceDir]\" and /TrgDir="[TARGETDIR]\" > > however when I give /SrcDir="[SourceDir]\" , /TrgDir="[TARGETDIR]\" > for my custom action it does not work. How can I get both. > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: How to get the location where user ask msi to install the appl Thanks that actually worked. To confirm I want to ask I have to check some conditions from SourceDir and if it fails then I have to rollback the installation. However it looks like I have to write a program to delete the files from TARGETDIR as it does not get deleted automatically. Please confirm. |
My System Specs![]() |
| | #6 (permalink) |
| | Re: How to get the location where user ask msi to install the appl It sounds like, based on some condition within the source installation, you want to uninstall after begining the install, via a custom action. To be honest, I have never had need to do this intentionally. I have had occasion where this occurs via an error being thrown in my custom action. Therefor, I would recommend throwing an exception from your custom action code, such as New Exception("You have a stolen source disk"). This install should then "fail" more or less gracefully. "vidishasharma@xxxxxx" wrote: Quote: > Thanks that actually worked. > > To confirm I want to ask I have to check some conditions from > SourceDir and if it fails then I have to rollback the installation. > However it looks like I have to write a program to delete the files > from TARGETDIR as it does not get deleted automatically. > > Please confirm. > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: How to get the location where user ask msi to install the appl Yes I do that InstallException("Installer failed"); however files from the target directory do not get removed. So I have to remove it by my program. Do you recommed this. |
My System Specs![]() |
| | #8 (permalink) |
| | Re: How to get the location where user ask msi to install the appl Strange... My experience is the files got removed. I guess you will need to do it manually in your code. "vidishasharma@xxxxxx" wrote: Quote: > Yes I do that > InstallException("Installer failed"); > > however files from the target directory do not get removed. So I have > to remove it by my program. > > Do you recommed this. > |
My System Specs![]() |
| | #9 (permalink) |
| | Re: How to get the location where user ask msi to install the appl some of the files are used in the targetdir and therefore it is throwing an exception and not leting me delete the files ![]() |
My System Specs![]() |
| | #10 (permalink) |
| | Re: How to get the location where user ask msi to install the appl Can you move your checks from the SourceDir to occur in the OnBeforeInstall event? This is presuming you are doing it in the Commit event now. "vidishasharma@xxxxxx" wrote: Quote: > some of the files are used in the targetdir and therefore it is > throwing an exception and not leting me delete the files ![]() > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| User Documents - New location? | Vista General | |||
| set application window location? | Vista General | |||
| Install application as standard user | Vista security | |||
| Changing the location of the user account | Vista General | |||
| User temp files location | Vista General | |||