Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6561281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:34:03+00:00 2026-05-25T13:34:03+00:00

I am trying to execute a .bat to launch notepad.exe on my localhost(server-side) with

  • 0

I am trying to execute a .bat to launch notepad.exe on my localhost(server-side) with the following code:

index.asp

<%
set wshell = CreateObject("WScript.Shell") 
return = wshell.run("c:\file.bat", 4, false)
response.write(return)
set wshell = nothing 
%>

file.bat

notepad.exe

When I open the ASP page, nothing happens. A value 0 is returned because of the variable “return”. So I tried set the false value to be true, and then the server froze and didn’t return anything; I think that happened because there were no values to be returned from the .bat file.
I tried also running the notepad.exe (C:\Windows\notepad.exe) directly instead of using a .bat file but still nothing happened. I also tried using ASPExec.dll but to no avail either.

Does anyone know what I am doing wrong?

More info:

My local web server is IIS7 that comes with Windows 7. I am doing this on localhost just for testing purposes. I have to accomplish this in Classic ASP because eventually I will have to import the website to a WinCE7 device. I am aware that WshShell is not available for WinCE but for now I am just trying to see if it works. Eventually I will need to be able to run a .exe that installs updates on the device through the website.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:34:04+00:00Added an answer on May 25, 2026 at 1:34 pm

    Your code is running as a non-interactive IIS user; it cannot interact with the local desktop.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to execute a .bat file remotely and implementing following lines of
I am trying to execute the following code from a firefox extension but it
I'm trying to get my commit-build.bat to execute other .BAT files as part of
While trying to execute the following lines only the last two statements are displayed(Here
I'm trying to execute a asp.net webservice using jquery. When I pass only one
I'm trying to execute the following line: exit | sqlplus username/password@sid @test.sql Works great
Trying to execute someone's code, getting a syntax error. No idea why :( def
I'm trying to launch Cygwin version of ruby.exe from a .NET application, but I'm
I am trying to execute my PHP code, which calls two MySQL queries via
I am trying to execute a codeline similar to the following rs3 = cn2.Execute(strsql);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.