473,320 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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.CreateObject("WScript.Shell")
}

</script>
<SCRIPT Language=VBScript>

Sub Sendmy()

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

WshShell.SendKeys("%(T)")


WshShell.SendKeys("+(M)")

WshShell.SendKeys("+(M)")
WshShell.SendKeys("+(P)")

End Sub

</SCRIPT>
</Html>
sincerely yours
Mike John
Nov 17 '05 #1
2 19255
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********@hotmail.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.CreateObject("WScript.Shell")
}

</script>
<SCRIPT Language=VBScript>

Sub Sendmy()

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

WshShell.SendKeys("%(T)")


WshShell.SendKeys("+(M)")

WshShell.SendKeys("+(M)")
WshShell.SendKeys("+(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********@hotmail.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.CreateObject("WScript.Shell")
}

</script>
<SCRIPT Language=VBScript>

Sub Sendmy()

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

WshShell.SendKeys("%(T)")


WshShell.SendKeys("+(M)")

WshShell.SendKeys("+(M)")
WshShell.SendKeys("+(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
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...
3
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
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?...
1
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. ...
0
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...
5
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...
4
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...
2
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"...
16
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: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.