[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Command Prompt automation

Posted on 2007-08-07
Medium Priority
Last Modified: 2010-04-16
i have to run a command thru command prompt which i think runs a batch file. i would like to have this automated and put on a icon where i can double click it on my desktop and it runs.
Question by:tomasdlv
  • 2
LVL 30

Expert Comment

ID: 19651051
Create you batch file. Here's an example:

@echo off



Right-click on desktop and select New --> Shortcut.

Enter the fully qualified name of the batch file. Like c:\temp\temp.bat

Give it a name.

There you go!

Author Comment

ID: 19651151
this is great!!

how do i make it say something for example a pause and then say "this will run this command ...sure to continue  y or n" and then accept an anwser.
LVL 30

Accepted Solution

SteveGTR earned 2000 total points
ID: 19651227
@echo off


set ans=

set /p ans=This will run this command. Are you sure you want to run it (Y/N)?

if /i not "%ans%"=="Y" goto :EOF

REM ** Place the command here

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question