EccentricDyslex Posted February 21, 2011 Posted February 21, 2011 I have a program written in vb on vs2010 which i have published to a NAS. The program requires "dgb.dll" (a custom dll) to be in the local PC's windows/system32 folder. How do i get vs2010 to get the published clickonce file to install this automatically and in the correct place? (also needs to be installed in wow64 for 64bit systems) I have been through much online info about prerequisites, bootstraps and references but am struggling to make much sense of it all...can someone point me towards a walk through or maybe walk me through it here? Many thanks! Steve Quote
Administrators PlausiblyDamp Posted February 21, 2011 Administrators Posted February 21, 2011 Clickonce applications are designed to be a "low impact" deployment and as such are installed per-user rather than per-machine as this doesn't require any administrative permissions. Modifying the System32 folder however requires administrator permissions and is a per-machine wide change. If you need to deploy things to a central location clickonce is probably not the technology to use, can you not just deploy this dll alongside the application itself? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
EccentricDyslex Posted February 21, 2011 Author Posted February 21, 2011 Its not ideal but at least its a step forward. How do i go about doing that instead? cheers steve Quote
Administrators PlausiblyDamp Posted February 22, 2011 Administrators Posted February 22, 2011 Have you tried putting the dll in the same folder as the application and listing it as a required file under the clickonce property page? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
devTastic Posted February 23, 2011 Posted February 23, 2011 Have you tried putting the dll in the same folder as the application and listing it as a required file under the clickonce property page? Good place to check - before you do that, if this isn't a DLL you have built yourself, but rather an assembly you are simply references, make sure that your reference properties have been set to 'copy local' = 'true' for this reference. Quote
EccentricDyslex Posted February 23, 2011 Author Posted February 23, 2011 Thanks for the advice chaps. PD, can i ask, if i put the dll in the same application folder, will VS publish it along with the app via click once? or does this have to be manualy copied over to the new machine? dT, the dll is supplied by the vendor of the device i am instructing in the vb program. The vendor states this must be copied into the system32 folder for the device to work. I am not sure if the dll controls the device or not...im not that knowledgable just yet lol. Can you explain what setting reference properties to local copy does? It would be ideal if i didnt have to install the dll to system32 and just distribute it with the app in the apps own folder if possible. Cheers! Steve Quote
Administrators PlausiblyDamp Posted February 24, 2011 Administrators Posted February 24, 2011 If you set a reference to "copy local" it simply means a copy the the dll will be included in the folder containing the executable. You should be able to add the dll to the clickonce package, if you bring up the properties for the project in visual studio and go to the publish tab you should be able to add the .dll in as a required file - this means it will be deployed by click once automatically. Sometimes files were dumped into system32 as a way of making them available to the entire system, if it is only needed by one app then it might work if it is contained in the same folder as the .exe itself. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
EccentricDyslex Posted February 24, 2011 Author Posted February 24, 2011 Thanks PD. I have tried to add it as a reference via "project", "add reference", "browse" but am getting an error- dgb.dll could not be added, check its a valid assemebly or COM componant... Any ideas? Steve Quote
Administrators PlausiblyDamp Posted February 25, 2011 Administrators Posted February 25, 2011 If it isn't a .net or a com dll then you don't need to add it as a reference to the project, you would just need to include it in the project properties -> publish tab. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.