Parameter prompt on windows shortcut

Posted on 2001-06-12
Last Modified: 2012-05-04
Is there a way to get a windows shortcut to prompt you for a parameter before running? I used to use this type of thing back in the old DOS days where you can create a batch file and read in the values of %1 %2 etc.

For example, when I double-click on a shortcut, I would like it to prompt me for a parameter and pass it to the application.

I thought I read somewhere once that this could be done, but I do not remember.

Thank you
Question by:liebrand
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 63

Expert Comment

ID: 6183501
You would probably need to use simple scripting in a batch file.
WSH or any script language should work fine.

Also check the free wincmd on

I hope this helps !!
LVL 10

Expert Comment

ID: 6183535
I did a little test and created a shortcut for msdos editor.
In application name i typed


and it prompted me for a filename. I typed c:\bootlog.txt and it opened with that file open.

Hope this helps
LVL 10

Accepted Solution

tonnybrandt earned 50 total points
ID: 6183541
That came out a bit wrong:

The paragraph:
In application name i typed


and it prompted me for a filename. I typed c:\bootlog.txt and it opened with that file open.

Should have been

In application name i typed


and saved the shortcut.

When executed, it prompted me for a filename. I typed c:\bootlog.txt and it opened with that file open.

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

LVL 15

Author Comment

ID: 6183602
Thanks! It only works with PIF files, but I can live with that
LVL 10

Expert Comment

ID: 6183633

Expert Comment

ID: 8075902
(now that I'm an expert)

1. Create a batchfile, like this

echo off
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" /decompile %1

2. Create a shortcut targeting the batchfile, like this


3. Connecting the dots:
The question mark in the shortcut command line feeds the
percent param placeholder in the batchfile.

4. Drag an mdb file onto the shortcut.


Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

630 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