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 6028215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:42:19+00:00 2026-05-23T04:42:19+00:00

I am happily launching a program in a windows system from Lua using strProgram

  • 0

I am happily launching a program in a windows system from Lua using

strProgram = '"C:\\Program Files\\Ps Pad\\PSPad.exe"'
strCmd = 'start "" '..strProgram
os.execute(strCmd)

This works correctly, launching the program and the script finishing.
How ever it flashes up a command window for a fraction of a second, does any one have a way from Lua to launch a program.

  • 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-23T04:42:20+00:00Added an answer on May 23, 2026 at 4:42 am

    Lua’s os.execute command is based on the C standard library “shell” function. In Windows, this function will always create a command window, and it will always halt your current process until the window finishes. The latter also happens in Linux.

    There is ultimately no way around this. Not through the Lua standard API. Because Lua needs to be light-weight and platform independent, the API is not allowed to use OS-dependent native APIs.

    Your best bet would be to use the Lua Ex-Api module. It is effectively abandonware, and you may need to patch up a few compiler issues (I’m guessing the Windows port wasn’t their first priority). But it is a reasonably good way to spawn processes. You can choose to wait until it finishes yourself, or let them run in parallel. And it won’t throw up a command prompt window, unless the application itself uses one.

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

Sidebar

Related Questions

I'm producing HTML from twitter search results. Happily using the Net::Twitter module :-) One
So I've been happily using subversion to regularly commit files in my stack of
For some time now I've been happily using dlmalloc for a cross-platform project (Windows,
I was happily using log4net with my WPF program on an XP machine and
I'm happily using swank-clojure, installed via elpa. But I'd like to do some work
I have a PHP app running happily on the following system: web app: PHP
I have a very simple table and I can happily query it using LINQ
After happily using open source software for many years I've figured it's time to
I've been very happily using PredicateBuilder but until now have only used it for
I have a project that currently compiles happily on my dev machine using VS

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.