Solved

Parameter prompt on windows shortcut

Posted on 2001-06-12
6
1,706 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 15

Author Comment

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

Expert Comment

by:tonnybrandt
Comment Utility
:~)
0
 

Expert Comment

by:clinresys
Comment Utility
(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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
A procedure for exporting installed hotfix details of remote computers using powershell
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now