Answered by:
Register OCX/dll in System32 folder using Setup Wizard

Question
-
I would like to create a Setup Package to register ocx files, dll files in c:\windows\System32 folder for Win XP and in c:\Windows\SysWOW64\ for win 7. Can someone tell me how to do this and make this as a prerequisite to my Click Once application.
Thanks
Shashi
Wednesday, June 6, 2012 6:49 PM
Answers
-
Hi ShaSHi,
You can create a Visual Studio Setup project ,add the ocx/dll file to the System Folder and then set the Register Property to vsdrpCOM.Then the file will be registered.
Then create a custom bootstrapper with the msi file, see http://msdn.microsoft.com/en-us/library/ms165429.aspx.
If there is anything unclear, please let me know.
Best Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us
- Marked as answer by SSFed Tuesday, June 12, 2012 1:32 PM
Monday, June 11, 2012 5:49 AM -
In the setup project, File System View, right click onFile System on Target Machine and Add Special Folder "SysemFolder". That's auomatically the right place whatever the system.
Phil Wilson
- Marked as answer by SSFed Tuesday, June 12, 2012 1:32 PM
Monday, June 11, 2012 4:32 PM
All replies
-
Hi ShaSHi,
You can create a Visual Studio Setup project ,add the ocx/dll file to the System Folder and then set the Register Property to vsdrpCOM.Then the file will be registered.
Then create a custom bootstrapper with the msi file, see http://msdn.microsoft.com/en-us/library/ms165429.aspx.
If there is anything unclear, please let me know.
Best Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us
- Marked as answer by SSFed Tuesday, June 12, 2012 1:32 PM
Monday, June 11, 2012 5:49 AM -
Bob,
Thank you for the response, i will try it today and let you know how it goes.
Also, is there a way to identify on which machine (Win xp/Win 7) my prerequisite is going to be installed and change the path of registering the dlls to System32 or sysWOW64 folder?
Thanks,
Shashi
Shashi
Monday, June 11, 2012 3:07 PM -
In the setup project, File System View, right click onFile System on Target Machine and Add Special Folder "SysemFolder". That's auomatically the right place whatever the system.
Phil Wilson
- Marked as answer by SSFed Tuesday, June 12, 2012 1:32 PM
Monday, June 11, 2012 4:32 PM -
Bob & Phil.
Thanks for your help, i followed all the steps you guys told me and it worked perfect!!
Shashi
Shashi
- Edited by SSFed Tuesday, June 12, 2012 1:33 PM typo
Tuesday, June 12, 2012 1:32 PM -
Bit late but might help.
The help here was good, however in my case I was missing one thing.
Setting the "System" property of the file to "true", otherwise it didn't seem to register.
https://donaldrichardson1.wixsite.com/softwaregeneralist/post/registering-an-ocx-file-during-setup
Wednesday, July 31, 2019 12:34 AM