473,513 Members | 2,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ActiveXObject("Shell32.Application"). Error Object Expected

3 New Member
Hi!! my english is not too good, but i'll try it

I have a javascript code:
Expand|Select|Wrap|Line Numbers
  1.  function executeCommands(inputparms)
  2.    {
  3.   // Instantiate the Shell object and invoke 
  4.    its execute method.
  5.  
  6.     var oShell = new ActiveXObject("Shell32.Application");
  7.  
  8.     var commandtoRun = "C:\\Winnt\\Notepad.exe";
  9.     if (inputparms != "")
  10.      {
  11.       var commandParms = document.Form1.filename.value;
  12.      }
  13.  
  14.  // Invoke the execute method.  
  15.      oShell.ShellExecute(commandtoRun, commandParms, 
  16.       "", "open", "1");
  17.   }
  18.  
But the browser show this message error: Object Expected
Someone can Help me?

Thanks!!
Diego Ruiz
Aug 17 '07 #1
5 2839
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

Please use CODE tags when posting code. Thanks!

Which browser are you using? ActiveX only works in IE. You'll probably also have to confirm that you want the ActiveX control to execute or not.
Aug 17 '07 #2
Diego Ruiz
3 New Member
Hi!! thanks for your answers.
I'm using IE browser and I have then ActiveX control to execute

Thanks again

Diego Ruiz


Welcome to TSDN!

Please use CODE tags when posting code. Thanks!

Which browser are you using? ActiveX only works in IE. You'll probably also have to confirm that you want the ActiveX control to execute or not.
Aug 23 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
the browser show this message error: Object Expected
Which line causes this error?
Aug 24 '07 #4
Diego Ruiz
3 New Member
Which line causes this error?
Hi acoder, the line 6 is raising error:
6. var oShell = new ActiveXObject("Shell32.Application");

Thanks!!

Diego Ruiz
Aug 24 '07 #5
acoder
16,027 Recognized Expert Moderator MVP
Hi acoder, the line 6 is raising error:
6. var oShell = new ActiveXObject("Shell32.Application");
The most likely cause is that you haven't enabled ActiveX. Check your settings in your browser.
Aug 24 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
16762
by: Rosa | last post by:
Hi, I'm trying to clear the TIF on Windows XP programmatically with the below code. This code works fine on any folder but the TIF. For some reason the atEnd() statements always defaults to true...
1
5568
by: Darren Lew | last post by:
Hi there, I have this problem which is really driving me nuts for a couple of days. Glad if any help or suggestion is given Javascript will give me a pop-up error "Access is denied" when i try...
6
1709
by: eXseraph | last post by:
Hi, As we know,in normal asp.net application, a browser need to send a request to a server first to refresh its page. Now I need to design a asp.net application with real-time capability like the...
1
1497
by: Stephanie Stowe | last post by:
Hi. I have a problem that I am trying to troubleshoot on a client's production (*sigh*) servers. On one server, we will call web2 all works well. On another server, we will call web1, the client...
1
14747
by: drk.kumar | last post by:
I have an implementation issue with WMI scripts to check the user machine processor. The implementation is working fine in the local machine (Windows XP operating system). It is throwing script...
4
14046
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi there, I want to use javacript in my ASPX page, using ActiveX ( ActiveXObject("Shell.Application"); ) to call external application. How I know if the IExplorer settings for ActiveX is...
5
6392
by: Heofz | last post by:
Hey all, I've been banging my head against a brick wall on this one for the last 12 hours, and the time has come for me to give up and consult the gurus on this one. The below URL contains a...
0
4240
by: dim505 | last post by:
hi friends, I'm new to this forum. I have created and build a dll but at first it was getting the error"Automation server can't create object" after a lot of head ache,I got the script...
7
3909
by: ankitoshniwal | last post by:
Hello, I have been having this problem for the whole day today, so even after i googled for the solution i was not able to get one, so i had to post to this forum. I had checked the solutions...
0
7384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5089
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1596
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.