Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > setup project error in custom action
 

setup project error in custom action

hi dears.

i have a question about setup project in VS.net2008. i read many posts and other contribution to built a setup for my project. now i have a setup with custom action. the custom action call the installer class to edit .config file and connection strings locally. the setup install normally on my PC but when i port the setup files ".exe" & ".msi" to other computer,the error 1001 occur on that pc at the end of the installation process.

here is the image of that error:

http://www.myimghost.com/viewer.php?file=h5faed3debo57q4sneg.jpg


thanks 4 ur attention.
dreams4gotten_ir  Friday, June 19, 2009 6:42 AM
Strictly speaking, this isn't the setup. It's something that you're doing in your custom action code, so what is in that code? What are you doing that is trying to load the types from that assembly? Are running regasm or something?
Phil Wilson
PhilWilson  Monday, June 22, 2009 8:56 PM
thanks.

I test this many and many with different scenarios. now i remove any code from "installer" class unless "base.install(...)" but the error is existed now.

i think maybe some referenced assembly must be added to setup dependencies.

thanks 4 ur attention.
dreams4gotten_ir  Tuesday, June 23, 2009 2:15 PM
Hi,

The following article introduces a way to edit .config file in a custom action and it may help you:
http://www.codeproject.com/KB/database/Deploy_your_database.aspx

Hope this helps.

Sincerely,
Linda Liu
Please remember to mark the replies as answers if they help and unmark them if they provide no help. end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
Linda Liu  Monday, June 29, 2009 1:35 PM
thanks linda.

but i solve that problem by adding "crystalreport" assemblies in to setup project.

now i have new error message about connect to database.

in my setup project i used custom action to connect in sqlserver and install my database but the fallowing error occurs :

" Login failed for user '<LoginName>'. Reason: Not associated with a trusted SQL Server connection "

i have sqlserver 2000 server with mixed mode installation. its strange that when i copy my application to clients and runs it, all the things is OK and that works well but why setup project can not connect to sqlserver with same connection string?



dreams4gotten_ir  Monday, June 29, 2009 5:13 PM
I don't know SQL so I don't know for sure, but it's not strange at all to me. In A VS 2008 custom action installer class your code will be running with the SYSTEM account, not the installing user's credentials. It'll be running on a msiexec.exe process with a working directory of the system folder, and won't see any registry entries that are belong only to the installing user.
There is a common expectation that code running as a custom action behaves the same as application code and runswith the interactive user's account, but that's not the way it works. Like all frameworks that call user-supplied code (such as ASP.NETorInternet Explorer) it's necessary to be aware of the very different context that your code runs in.
Phil Wilson
PhilWilson  Monday, June 29, 2009 5:26 PM
you say that there is not any solution to create database of big project at installation time ? !!!
dreams4gotten_ir  Monday, June 29, 2009 5:30 PM

You can use google to search for other answers

Custom Search

More Threads

• "The Operation Has timed out." CLOnce working fine previously. Now, suddenly no workin, no more.
• Passing authentication information in Clickonce URL
• Urgent project. I really need help here on making a deployment project
• Truely Automatic Updates?
• Can not properly add Localized Resources from C++.Net Project Output
• ClickOnce places a configuration file in the wrong directory
• Sign ClickOnce application with cert from store
• ClickOnce (3.5) - Including data file in runtime
• Installing Redistributable Packages from a Networked Location...
• ClickOnce Certificate Signing fails in Win2003 Application Mode