Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-07-2008, 12:59 PM
Junior Member
 
Join Date: Jun 2008
Posts: 7
Default ActiveXObject do'nt works in Vista?

Hi..
This code works fine in XP but do'nt works in Vista. Do you have an idea why?
Merci

var fr = new ActiveXObject("frObj.frReportObj");
if (fr == undefined || fr.version == undefined || fr.version < 1.1)
{
var fr_file = getAdditionalFile('frObj.dll');
var f = new File(fr_file);
var sys_path = Shell.getSpecialFolder("system") + '\\' + f.name;
f.copy(sys_path);
ActiveXObject.register(sys_path);

fr = new ActiveXObject("frObj.frReportObj");
}
Reply With Quote
  #2 (permalink)  
Old 11-08-2008, 09:02 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: ActiveXObject do'nt works in Vista?

It's highly possible that the "register" method has failed on your Vista computer, because it requires the administrator privilege. Fortunately, you can use the addObjectInfo instead:

Code:
ActiveXObject.addObjectInfo(getAdditionalFile("frObj.dll"),
"frObj.frReportObj",
  "{CE52CEFB-1521-4DD4-AE1C-2EF11C0BA209}",
  "{DB7E760B-27CF-4D8D-93CA-54D2CC8373E8}");

var fr = new ActiveXObject("frObj.frReportObj");
In this way, the activex object no longer needs to be registered.
Reply With Quote
  #3 (permalink)  
Old 02-10-2009, 02:44 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Vista and activeX

Can the same method be applied for the AutoUpdate-activeX
Which code should I use to do so?
Reply With Quote
  #4 (permalink)  
Old 02-10-2009, 08:11 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

You can call the dll directly without using the activex method in swfkit pro. More detais can be found in the online document of swfkit, the last article "using autoupdate" of the tutorials section. However, there is a bug in the autoupdate when using in vista, on which we're still working. We'll let you know when it has been fixed.
Reply With Quote
  #5 (permalink)  
Old 12-30-2009, 03:09 PM
Junior Member
 
Join Date: Dec 2009
Posts: 1
Default Works in XP but not in Vista

The following javascript code works good in XP but not in Vista

var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("cmd /c echo %userprofile%");
while (oExec.Status == 0)
{

}
var Buf = '';
while (!oExec.StdOut.AtEndOfStream) {
Buf += oExec.StdOut.Read(1);
}

//alert("Final: " + oExec.stdout);
alert("Final: " + Buf);
oExec = null;
WshShell = null;

I was getting "Server Cannot Create Object" error.... I have changed IE settings for ActiveX objects and now I get "Access Denied"

I do not want to make all these changes. Is there any way.
Any help ???

Last edited by tezzzzz; 12-30-2009 at 03:13 PM.
Reply With Quote
  #6 (permalink)  
Old 01-02-2010, 09:16 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

Quote:
Originally Posted by tezzzzz View Post
The following javascript code works good in XP but not in Vista

var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("cmd /c echo %userprofile%");
while (oExec.Status == 0)
{

}
var Buf = '';
while (!oExec.StdOut.AtEndOfStream) {
Buf += oExec.StdOut.Read(1);
}

//alert("Final: " + oExec.stdout);
alert("Final: " + Buf);
oExec = null;
WshShell = null;

I was getting "Server Cannot Create Object" error.... I have changed IE settings for ActiveX objects and now I get "Access Denied"

I do not want to make all these changes. Is there any way.
Any help ???
Do you mean that you're trying to call the javascrit in IE?
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:25 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.