473,666 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error:: Activex componet can not create object:"WScript .Shell"

I am trying to use the shell object to send keys to the
explorer browser to run the send page funcion.

I am receiving the above error only when I put my html
file in the web server folder.However if I am runing the
file local it will work
Any reason, why when the file is in the web server folder
the create object failed to created the shell object.

Systax:
<html>
<head>
<body>
<Form name = myform>
<input type = button onclick = "Sendmy()" value
= "Axiolog Email">
</form>
</body>
</head>
<script langauage = "Javascript ">
function Sendmxy()
{
alert("ASDFSA")
var wshell = WScript.CreateO bject("WScript. Shell")
}

</script>
<SCRIPT Language=VBScri pt>

Sub Sendmy()

Dim WshShell
dim intloop
dim intCount
dim intc
Set WshShell = CreateObject("W Script.Shell")
alert("Yes")

WshShell.SendKe ys("%(T)")


WshShell.SendKe ys("+(M)")

WshShell.SendKe ys("+(M)")
WshShell.SendKe ys("+(P)")

End Sub

</SCRIPT>
</Html>
sincerely yours
Mike John
Nov 17 '05 #1
2 19271
Browser security settings may be hampering your attempts. To get it to
work, the setting you'll most likely need to adjust can be found on the
Internet Options dialog under the Tools dropdown menu in Internet Explorer.
Go to the security tab. With local Intranet selected (assuming this is an
intranet app), click the "Customize Level." button. Find the setting titled
"Initialize and script ActiveX controls not marked as safe" and change the
selection to either "enable" or "prompt."

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Mike John" <Ri********@hot mail.com> wrote in message
news:0d******** *************** *****@phx.gbl.. .
I am trying to use the shell object to send keys to the
explorer browser to run the send page funcion.

I am receiving the above error only when I put my html
file in the web server folder.However if I am runing the
file local it will work
Any reason, why when the file is in the web server folder
the create object failed to created the shell object.

Systax:
<html>
<head>
<body>
<Form name = myform>
<input type = button onclick = "Sendmy()" value
= "Axiolog Email">
</form>
</body>
</head>
<script langauage = "Javascript ">
function Sendmxy()
{
alert("ASDFSA")
var wshell = WScript.CreateO bject("WScript. Shell")
}

</script>
<SCRIPT Language=VBScri pt>

Sub Sendmy()

Dim WshShell
dim intloop
dim intCount
dim intc
Set WshShell = CreateObject("W Script.Shell")
alert("Yes")

WshShell.SendKe ys("%(T)")


WshShell.SendKe ys("+(M)")

WshShell.SendKe ys("+(M)")
WshShell.SendKe ys("+(P)")

End Sub

</SCRIPT>
</Html>
sincerely yours
Mike John

Nov 17 '05 #2
CT
I would assume that your problem has to do with permissions on the server.

--
Carsten Thomsen
Enterprise Development with Visual Studio .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Mike John" <Ri********@hot mail.com> wrote in message
news:0d******** *************** *****@phx.gbl.. .
I am trying to use the shell object to send keys to the
explorer browser to run the send page funcion.

I am receiving the above error only when I put my html
file in the web server folder.However if I am runing the
file local it will work
Any reason, why when the file is in the web server folder
the create object failed to created the shell object.

Systax:
<html>
<head>
<body>
<Form name = myform>
<input type = button onclick = "Sendmy()" value
= "Axiolog Email">
</form>
</body>
</head>
<script langauage = "Javascript ">
function Sendmxy()
{
alert("ASDFSA")
var wshell = WScript.CreateO bject("WScript. Shell")
}

</script>
<SCRIPT Language=VBScri pt>

Sub Sendmy()

Dim WshShell
dim intloop
dim intCount
dim intc
Set WshShell = CreateObject("W Script.Shell")
alert("Yes")

WshShell.SendKe ys("%(T)")


WshShell.SendKe ys("+(M)")

WshShell.SendKe ys("+(M)")
WshShell.SendKe ys("+(P)")

End Sub

</SCRIPT>
</Html>
sincerely yours
Mike John

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
24137
by: Bill | last post by:
I used to be able to run the following ASP code on our corp machine (W2K Server Edition and IIS-5) and successfully send a net-msg to anyone on our intranet. Last week it stopped working... and I'm not sure what changed. (I had applied ALL the W2K update patches... but... I'm not sure if the problem started before or after that.) Did any recent W2K patches change the way createObject, wScript.shell, or "NET SEND" works?
3
2841
by: MLH | last post by:
Where would I go to find a list of the possible return values for X and their implication when launching.. X=Shell("C:\Windows\wordpad.exe c:\cr\docs\packets\ntrolttr.rtf", 1) ???
9
9321
by: Amjad | last post by:
I'm trying to create a folder, append text file to another, and delete files using the "Shell" command. But I always get the error "File Not Found". How do I use DOS commands from Visual Basic? My code is something like: Dim folderPath as String folderPath = "C:\MyFolder"
1
22566
by: Dennis | last post by:
I use the below code to get the Network Places items. However, this requires "Late Binding". I read that you can avoid late binding by adding a reference to the Com Types in your application. Does anyone know what reference to add and what to import? Dim drives() As String Dim ob As Object = CreateObject("WScript.Network") Dim odrives As Object = ob.EnumNetworkDrives dim k as integer If odrives.count > 0 Then
0
2823
by: Andrea | last post by:
My C# application is a drop target for the drop format Shell IDList Array I have some problems actually getting the data. I was using the same code used for the FileDrop data target but I'm getting an exception. What's the correct way to handle this type of data? I receive an invalid cast exception. Here's my non working code Array droppedItemList = (Array) e.Data.GetData("Shell IDList Array");
5
1510
by: Nick Gilbert | last post by:
Hi, I recently upgraded a website from ASP.NET 1.1 to 2.0. While working on the site and changing aspx or ascx files, I sometimes randomly get a compilation error after refreshing the page in the browser (NOT when building the project from within VS.NET). The only way to fix it is to clean the project and rebuild it - then reload the page again. This behaviour is very annoying and I can't work out what's causing it. None of my other...
4
14058
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 enabled ? Any helper javascript class for do it ? Any help will be appreciated, and I will be very grateful.
2
5561
by: moodyman13 | last post by:
Hi all, Hoping someone can help me. I'm using WSH to automatically map a network drive when someone opens a webpage. Below are the codes <HTML> <Body> <script language="VBScript" type="text/vbscript"> Option Explicit On Error Resume Next
16
9219
by: lawrence k | last post by:
I've never before written a PHP script to run on my home Ubuntu machine (though I've written dozens of PHP cron jobs for my web server), so I thought I'd start off with a very simple test: #!/usr/share/php5 <?php echo "hello"; ?>
0
8443
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8866
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7385
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6192
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5663
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4366
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.