Solved

Parameter prompt on windows shortcut

Posted on 2001-06-12
6
1,735 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 50 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 7 7 264
DNS server query - zone verus cache 5 181
Get process CPU use Win2000 server in visual basic 12 141
Running Baan iV on VMware 3 140
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…
One of the biggest threats in the cyber realm pertains to advanced persistent threats (APTs). This paper is a compare and contrast of Russian and Chinese APT's.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

774 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