Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Parameter prompt on windows shortcut

Posted on 2001-06-12
6
Medium Priority
?
1,814 Views
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
0
Comment
Question by:liebrand
6 Comments
 
LVL 63

Expert Comment

by:SysExpert
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 zdnet.com

I hope this helps !!
0
 
LVL 10

Expert Comment

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

EDIT ?

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

Hope this helps
Tonny
0
 
LVL 10

Accepted Solution

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

The paragraph:
-------------------------------------
In application name i typed

EDIT ?

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

EDIT ?

and saved the shortcut.

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

Tonny
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
LVL 15

Author Comment

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

Expert Comment

by:tonnybrandt
ID: 6183633
:~)
0
 

Expert Comment

by:clinresys
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

C:\WINDOWS\PROFILES\CLINRESYS\DESKTOP\DECOM.BAT ?

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.


0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

916 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