![]() ![]()
This most likely happens on a 32bit machine when processing the path to 64bit regasmĪrguments = string.I have 2 Mac computers and I want to install Win 8 on both, I got Parallels in one computer and Boot Camp on the second one. Skip the executables that do not exist Var dll_path = Assembly.GetExecutingAssembly().Location String.Concat(net_base, "\\Framework64\\", RuntimeEnvironment.GetSystemVersion(), "\\regasm.exe") String.Concat(net_base, "\\Framework\\", RuntimeEnvironment.GetSystemVersion(), "\\regasm.exe"), Var net_base = Path.GetFullPath(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), Create paths to 32bit and 64bit versions of regasm.exe #2009 macbook 32 or 64 bit 64 Bit#part in order to create 32 and 64 bit paths C:\Windows\Microsoft.NET\Framework64\v7\ RuntimeEnvironment.GetRuntimeDirectory() returns something like Private static void RegAsm(string parameters) Public override void Uninstall(IDictionary savedState) ![]() Public override void Install(IDictionary stateSaver) Public partial class AddInInstaller : Installer We can use this, combined with RuntimeEnvironment.GetSystemVersion() to construct the paths to 32bit and 64bit versions of the tool: On my machine, it returns C:\Windows\Microsoft.NET\Framework\v7\ inside the installer action. NET provides the RuntimeEnvironment.GetRuntimeDirectory() static method which returns the folder of the common language runtime. The directories might not be the same on other machines, of course. C:\Windows\Microsoft.NET\Framework64\v7\RegAsm.exe.C:\Windows\Microsoft.NET\Framework\v7\RegAsm.exe.On my Vista 64, there are two versions of this tool: The solution I came up with is simpler: instead of using RegistrationServices object, I can manually execute the RegAsm.exe tool to register the assembly. And searching the net, I got the impression that it would not solve the problem anyway – at least not without some other tools. I also wanted to allow the same MSI to be used on all platforms, so compiling multiple versions was not an option. #2009 macbook 32 or 64 bit how to#The only problem is how to run the installer as 64 bit. The code itself is all C#, compiled as “Any CPU”, so it should have no problems running unmodified with both 64 and 32 bit Inventors. The reason became apparent when I realized that my Inventor installation is also 64 bit – which means it looks for the keys using the 64bit view of the registry, while the installer action runs with the 32bit view. This worked fine on Windows XP, but when run on my Vista 64, the setup completed successfully, but failed to register the addin with Inventor. The actual registration code run by the registration service modifies some registry keys under HKEY_CLASSES_ROOT. ![]() ![]() Regsrv.UnregisterAssembly(GetType().Assembly) Public override void Uninstall( savedState) Regsrv.RegisterAssembly(GetType().Assembly, AssemblyRegistrationFlags.SetCodeBase) RegistrationServices regsrv = new RegistrationServices() Public override void Install( stateSaver) Public partial class AddinInstaller : Installer In order to register the addin with Inventor, I needed to register the assembly with “/codebase” switch, so I made a custom installer action: I have an addin for AutoDesk Inventor 2009, written in C# and a setup project to go with it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |