Solved

Parameter prompt on windows shortcut

Posted on 2001-06-12
6
1,741 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

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.

Question has a verified solution.

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

Suggested Solutions

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…
Read about why it is more lucrative for an IT company to participate in government projects.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

820 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