What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Question] Registering ocx components

[Question] Registering ocx components
Author: Message:
tryxter
Junior Member
**

Avatar
A. Maia Ferreira @ PTnet

Posts: 51
Reputation: 1
35 / Male / –
Joined: Jan 2007
O.P. [Question] Registering ocx components
How is this done? I know I must use regsrv32, but how can I run DOS commands on a script?
The objective is to register the ocx component while loading the script, so it can be accessible by the script.

Thanks
01-22-2007 01:20 PM
Profile E-Mail PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [Question] Registering ocx components
code:
var Shell = new ActiveXObject("WScript.Shell");
Shell.Run("regsrv32 /s:"+MsgPlus.ScriptFilesPath+"\\file.ocx");

or you could even place it under OleFiles in the scriptinfo.xml

This post was edited on 01-22-2007 at 01:32 PM by Felu.
01-22-2007 01:31 PM
Profile E-Mail PM Web Find Quote Report
tryxter
Junior Member
**

Avatar
A. Maia Ferreira @ PTnet

Posts: 51
Reputation: 1
35 / Male / –
Joined: Jan 2007
O.P. RE: [Question] Registering ocx components
quote:
Originally posted by Felu
code:
var Shell = new ActiveXObject("WScript.Shell");
Shell.Run("regsrv32 /s:"+MsgPlus.ScriptFilesPath+"\\file.ocx");

or you could even place it under OleFiles in the scriptinfo.xml

Thanks a lot! :)
Using this method (WScript.Shell) it will be ready to be accessed by MsgPlus?
01-22-2007 01:51 PM
Profile E-Mail PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: [Question] Registering ocx components
When you create a script-install program, you can choose which DLL's to register. But if you want to do it in a script, use Felu's code :).

To answer your question:
Maybe. I actually think this would require a computer restart, that's the reason why you have to restart your computer after installing programs (there's other reasons as well).
01-22-2007 01:54 PM
Profile E-Mail PM Find Quote Report
tryxter
Junior Member
**

Avatar
A. Maia Ferreira @ PTnet

Posts: 51
Reputation: 1
35 / Male / –
Joined: Jan 2007
O.P. RE: [Question] Registering ocx components
quote:
Originally posted by vikke
When you create a script-install program, you can choose which DLL's to register. But if you want to do it in a script, use Felu's code :).

To answer your question:
Maybe. I actually think this would require a computer restart, that's the reason why you have to restart your computer after installing programs (there's other reasons as well).

And if I use OleFiles it won't need a computer restart?
01-22-2007 02:49 PM
Profile E-Mail PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [Question] Registering ocx components
quote:
Originally posted by tryxter
Using this method (WScript.Shell) it will be ready to be accessed by MsgPlus?


Yea. Its the same as registering through the command line. You can use Shell.Run as many time as you want but placing it in OleFiles will only register it while the script is imported.
01-22-2007 02:54 PM
Profile E-Mail PM Web Find Quote Report
tryxter
Junior Member
**

Avatar
A. Maia Ferreira @ PTnet

Posts: 51
Reputation: 1
35 / Male / –
Joined: Jan 2007
O.P. RE: RE: [Question] Registering ocx components
quote:
Originally posted by Felu
quote:
Originally posted by tryxter
Using this method (WScript.Shell) it will be ready to be accessed by MsgPlus?


Yea. Its the same as registering through the command line. You can use Shell.Run as many time as you want but placing it in OleFiles will only register it while the script is imported.


Ok,
and one more time, thanks a lot! :)
01-22-2007 03:00 PM
Profile E-Mail PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: [Question] Registering ocx components
Yes, it's possible. If you put the OCX in the Windows folder, a reboot is a must to register it automatically! :)
01-22-2007 04:57 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On