|
-
Aug 5th, 2004, 01:19 AM
#1
Thread Starter
New Member
Executing Shell in ASP
I have this code in my asp
Dim oShell
Set oShell = CreateObject ("WScript.shell")
oShell.run "%comspec% /c notepad"
Set oShell = Nothing
It runs the notepad in the task list, but not appearing in the desktop for user interaction.
I have set the asp folder to full control for IUSR and IWAM users. And also full control to these 2 users for notepad.
The asp folder has also been set to Scripts/Executable.
Anything I have left out?
I am using Windows Server 2003, IIS 6
Anyone can help me to solve the problem?
-
Aug 5th, 2004, 05:59 AM
#2
Trying changing the line to :
Code:
oShell.run ("%comspec% /c notepad", 1, True)
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Aug 5th, 2004, 09:31 AM
#3
Thread Starter
New Member
After changing, it gives the following error. Do you have any suggestions?
Microsoft VBScript compilation error '800a0414'
Cannot use parentheses when calling a Sub
/LVB_Elaine/testshell.asp, line 17
oShell.run ("%comspec% /c notepad", 1, true)
--------------------------------------------^
-
Aug 5th, 2004, 09:32 AM
#4
Originally posted by et20
After changing, it gives the following error. Do you have any suggestions?
Microsoft VBScript compilation error '800a0414'
Cannot use parentheses when calling a Sub
/LVB_Elaine/testshell.asp, line 17
oShell.run ("%comspec% /c notepad", 1, true)
--------------------------------------------^
Oops sorry, take out the two brackets
oShell.run "%comspec% /c notepad", 1, true
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Aug 5th, 2004, 12:00 PM
#5
Thread Starter
New Member
The asp page seems hanged after I change the code.
I can see the program has been executed in the task list, but not in desktop.
-
Aug 5th, 2004, 12:22 PM
#6
Originally posted by et20
The asp page seems hanged after I change the code.
I can see the program has been executed in the task list, but not in desktop.
Hmm, its supposted to open the notepad, and wait for user to type and close the notepad.
I tried it and having the same problem as you, i even tried calling a batch file and getting the batch file to execute the notepad with no luckh. Not sure where the problem is.
For more info on Run command chec this MS link http://msdn.microsoft.com/library/de...l/wsmthrun.asp
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|