Windows Thread, Registering dll and OCX files on all clients in our school in Technical; Hi to all Hope everyone is well Please help me on a issue we have in our school. The maths ...
1. Registering dll and OCX files on all clients in our school

Hi to all

Hope everyone is well

The maths department have purchased some software called "Car maths in motion" and its been an absolute pain to install but we have managed to get the software working on the server.

As the software sits on a remote share when pupils try to execute the application it comes up with an error:

"component picclp32.ocx or one of its dependencies not correctly registered: a file is missing or invalid"

Basically it means the OCX file needs to be registered on every single workstation using the app.

The question I have is there a way I can script something so that when a user logs on it can register the OCX file or is there a third party tool that would do this.

Any help on this would be much appreciated. :?

2. Re: Registering dll and OCX files on all clients in our school

Create a vb script and assign it as either a logon or startup script ( cant remember which one ) on the correct OU for where the machines are that have this software installed.

Code:
Set oShell = CreateObject("Wscript.Shell")
oShell.Run "RegSvr32 /s " & chr(34) & "Path\to\file.ocx" & chr(34)
RegSvr32 switches

/u = Unregister server
/s = Silent; display no message boxes
/i = Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall
/n = do not call DllRegisterServer; this option must be used with /i

chr(34)

Used to add extra set of quotes " around a string. Used when passing to a cmdline or when there are spacing in the path you are using.

3. Re: Registering dll and OCX files on all clients in our school

thanks for that, is that all the code.

4. Re: Registering dll and OCX files on all clients in our scho

yes however you will have to alter the path to the relevant ocx file and if there is more then one file that requires registering then you will need to add to the above code to register each file.

ie :

Set oShell = CreateObject("Wscript.Shell")
oShell.Run "RegSvr32 /s " & chr(34) & "Path\to\file.ocx" & chr(34)

Where it says :

Path\to\file.ocx

you need to alter that in between the quotes to the actual fully qualified path of your ocx file or the file that requires to be registered. So if the ocx file was in

C:\windows\system32\ocx_file.ocx

Then you would put the above path in between the quotes.

If you need more help just post back

5. Re: Registering dll and OCX files on all clients in our school

Its an easy job using advanced installer as well to make an msi. Simply create a new MSI. Add all you DLLs etc and tell them to go to the system folder. Then just right click on each on and set them to auto register.

6. Re: Registering dll and OCX files on all clients in our school

Thanks for you help but I have run into a problem

This is the path to the file

Set oShell = CreateObject("Wscript.Shell")
oShell.Run "RegSvr32 /s " & chr(34) & "\\QBDomain\netlogon\Cars in Motion script\Picclp32.ocx" & chr(34).

This is the path to the netlogon share where the OCX file resides.

I not very good with VB script but created a batch file (.BAT) and put the script into there and got the following error when I ran the batch file :

"oshell.run is not recognised as an internal or external command. operable program or batch file."
"chr is not recognised as an internal or external command. operable program or batch file"

Do you know what it could be?

7. Re: Registering dll and OCX files on all clients in our school

Thanks Chris. Is advanced Installer an application?

8. Re: Registering dll and OCX files on all clients in our school

Originally Posted by ChrisH
Its an easy job using advanced installer as well to make an msi. Simply create a new MSI. Add all you DLLs etc and tell them to go to the system folder. Then just right click on each on and set them to auto register.
I agree with ChrisH, whilst scripts are great, using Advanced Installer to create a MSI will avoid registering the OCX multiple times and supports upgrade and removal.

9. Re: Registering dll and OCX files on all clients in our school

Yes I would agree with that as well, using the advanced installer that is.

Also just as an FYI it needed to be a vbs file extension not bat

10. Re: Registering dll and OCX files on all clients in our school

Advanced Installer is a free MSI creation tool. It is easy to use. Just get the free version as its ideal for simple jobs.

11. Re: Registering dll and OCX files on all clients in our school

Gecko

Thanks for all your help. It worked!!!

I probably check out that advanced installer as well. Seems like a good tool

Thanks again.

12. Re: Registering dll and OCX files on all clients in our school

Had something similar with some 2Simple installs..

http://www.edugeek.net/index.php?nam...=102115#102115

... was the solution.

13. Re: Registering dll and OCX files on all clients in our school

Not all DLL/OCX files need to be registered. You can try localising them, by placing a dummy .local file (can just be a blank text file) in the same folder as the executable and library. For instance, in the folder you'd have:
app1.exe
abc.dll
abc.dll.local

It doesn't always work, but worth a try.

SHARE: