Solved

Parameter prompt on windows shortcut

Posted on 2001-06-12
6
1,718 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

OpenVPN is a great open source VPN server that is capable of providing quick and easy VPN access to your network on the cheap.  By default the software is configured to allow open access to your network.  But what if you want to restrict users to on…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

948 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

23 Experts available now in Live!

Get 1:1 Help Now