Jump to content

Registering dll and OCX files on all clients in our school


Recommended Posts

Posted

Hi to all

 

Hope everyone is well

 

Please help me on a issue we have in our school.

 

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. :?

Posted

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.

 


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.

Posted

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 :)

Posted
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.
Posted

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?

 

Your help is much appreciated.

Posted
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.

Posted

Never knew about advanced installer ( handy to know about that ) thanks

 

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

 

:)

Posted

Gecko

 

Thanks for all your help. It worked!!!

 

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

 

Thanks again.

Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...