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

  • Home
  • SEARCH
  • 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 8562111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:39:33+00:00 2026-06-11T16:39:33+00:00

I am trying to make a script which would run an .exe file from

  • 0

I am trying to make a script which would run an .exe file from my computer. I think I am using the wrong command. I tried all the other commands like import os, os.startfile, but they aren’t working.

Here is my code:

loop=0
while loop==0:
    answer=raw_input("coded by: Narralol\n\n"
    "Pick a task:\n"
    "1) Start Minecraft.exe\n"
    "2) Start Minecraft_Server.jar\n"
    "3) Backup your server\n"
    "4) Copy the backup to your desktop\n"
    "5) Exit\n")
    if answer==1:
        execfile('D:\Games\Minecraft\Minecraft.exe')
    elif answer==2:
        execfile('D:\Games\Minecraft\Minecraft_server.jar')
    elif answer==5:
        loop=1
  • 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-06-11T16:39:35+00:00Added an answer on June 11, 2026 at 4:39 pm

    You can use os.system() like so (note: it is usually better to use subprocess for doing things like this):

    answer = 0
    while answer < 5:
        answer = int(raw_input("coded by: Narralol\n\n"
        "Pick a task:\n"
        "1) Start Minecraft.exe\n"
        "2) Start Minecraft_Server.jar\n"
        "3) Backup your server\n"
        "4) Copy the backup to your desktop\n"
        "5) Exit\n").strip())
        if answer == 1:
            os.system('D:\Games\Minecraft\Minecraft.exe')
        elif answer == 2:
            os.system('D:\Games\Minecraft\Minecraft_server.jar')
        elif answer == 5:
            break
    

    Changed a few other minor things in the code like checking an int against another int (instead of string against an int), etc.

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

Sidebar

Related Questions

I'm trying to make a script that would run through some sites that I
I have spent the whole day trying to make a script which on submit
So im trying to make an easy script, which will hold a video... And
I'm trying to make a script that will go into a directory and run
I'm trying to make simple script using jquery $post function to pass data to
I've been trying to make this script from ClearBox3 to stop conflicting with MooTools
Im trying to fix a Python script which takes the posts from a specific
I'm trying to make this script for a forum, which allows the use of
I'm trying to run a sql script using H2's runscript. One of the table
I'm running Oracle 11g on Linux and I'm trying to run a script which

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.