Auto-Register OCX

Hey there guys, I have 200-220 computers on this network that I am working on and I was looking for a quick solution to automatically register files such as OCX files on the machines. Now we have a login script that can shell applications, map drives, etc so I can shell the VB app whenever the user logs on, to register the files but I need to know how I can tell the computer to copy the OCX files/ other files to the windows directory or whichever directory I prefer and automatically register them.

This will save alot of time for me as I need to get all of these computers to register files such as RICHTX32, etc.

Cheers guys :)
[651 byte] By [Dark Potato] at [2007-11-20 10:13:14]
# 1 Re: Auto-Register OCX
Try this

First keep all the OCX and DLLS in a folder and share that folder

Second create a VB exe that will connect to the shared folder , copy the OCX and DLLS necessary to the local windows folder, then using shell regsvr32 register them on the local machine

Third copy this VB exe to all the machines

Then as you said

Now we have a login script that can shell applications, map drives, etc so I can shell the VB app whenever the user logs on

Shell the VB Exe
RajWolf at 2007-11-9 19:35:26 >
# 2 Re: Auto-Register OCX
After everything is at the right place, you could use the DllRegisterServer and DllUnregisterServer entry points which each ActiveX Framework exposes / supports.

Here's an example of what you would have to do with your ActiveX objects :
http://support.microsoft.com/kb/173091

And here's another example :
http://archive.devx.com/vb/free/articles/vb2themax/10tips/fb0201-6.asp
HanneSThEGreaT at 2007-11-9 19:36:26 >
# 3 Re: Auto-Register OCX
Try this

First keep all the OCX and DLLS in a folder and share that folder

Second create a VB exe that will connect to the shared folder , copy the OCX and DLLS necessary to the local windows folder, then using shell regsvr32 register them on the local machine

Third copy this VB exe to all the machines

Then as you said

Shell the VB Exe
Ahh okay well I can do all of that except for the copying of the files. I have never copied files from one location to another. Would you be able to give me an example?

Thanks alot guys :) You people help me out so much :D I love this place!
Dark Potato at 2007-11-9 19:37:30 >
# 4 Re: Auto-Register OCX
Ahh okay well I can do all of that except for the copying of the files. I have never copied files from one location to another. Would you be able to give me an example?

try this

eg:

FileSystem.FileCopy "\\computername\sharedfoldername\filename.ocx" , "c:\windows\system32"

shell "regsvr32.exe c:\windows\system32\filename.ocx"
RajWolf at 2007-11-9 19:38:30 >