6

I have a very simple Setup project that copies three dlls into the GAC. That's all it has to do. It works fine in XP, but on a Vista machine, it errors out stating that it cannot write to the file and to check permissions. I'm sure this has to do with some impersonation nonsense in Vista, but I'm not sure how to address it.

Has anyone else encountered this, and how did you overcome it if so?

4

4 回答 4

1

You use the gacutil.exe to install the dlls? Or do you just copy the files?

Anyway, GAC should be avoided for custom dlls unless they're used by many applications. Keep the dlls close/local to the application: it will only cost you some diskspace, and it enables you to use simple Xcopy deployment.

于 2008-12-19T08:22:46.787 回答
1

If you're using Windows Installer, are you putting your assemblies into the special Global Assembly Cache folder? That has always worked for me on Vista and Windows 7. There is no need to use GACUtil or anything else, just put the assemblies in the right folder in the installer project.

于 2009-05-08T12:56:14.827 回答
0

I have had some (3rd party) MSI's which won't install correctly unless I force elevated mode from the start, even if they show a UAC prompt later in the process.

Troubleshooting... I assume you are installing from an administrator account. But, is UAC enabled? If it is, are you getting the UAC elevation prompt? Try running the MSI package in elevated mode to see if it works. From an elevated command prompt:

msiexec /i setup.msi
于 2009-05-08T15:12:46.747 回答
0

What compiler are you using to make the MSI's? After last weekends fun I may be an expert at MSI vs. Vista issues :)

If using VC2003 or VC2005 there are different issues depending on the compiler version.

If 2005, be sure to have installed the service pack and the Vista service pack. That may solve your problem.

If that fails, you can put them in the GAC with a custom action, but beware there is a bug in 2005 where the no_impersonate bit is incorrectly set. You will have to set this bit yourself using either a script or orca.exe.

于 2009-05-08T15:15:31.873 回答