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

x
?
Solved

Install program from batch file or alter shortcut properties

Posted on 2001-06-29
4
Medium Priority
?
407 Views
Last Modified: 2008-02-26
Hello All,

First off, I'll admit I suck at DOS.  I'm really not sure of the capabilites of DOS.  Is it possible to write a batch file that will:

A.  Install another program.  If I were to manually install it, I would click the *.exe file then go through and hit the "Next" button at each prompt, then finally hit the "Finish" button.

B.  Alter the properties of a shortcut on the desktop.  I want to change the "Start in:" field of the shortcut.

Any thoughts would be appreciated or any documentation you could point me towards.
0
Comment
Question by:diamond1
4 Comments
 
LVL 50

Expert Comment

by:dbrunton
ID: 6239532
A Possibly not.  You would have to know the exact sequence of steps involved in the installation.  If there was no deviation you could then possibly use a keyboard stuffer to supply input strokes to the executeable to doi ti.  

I would personally use a Windows Scripting Language to do it in any case such as WinCmd written by Douglas Boling and available on ZDNet.

B  I understand that this is possible but someone else will have to supply the information.
0
 
LVL 24

Expert Comment

by:SunBow
ID: 6239895
A1) Normally a good installer has its own way of collecting the proper keystrokes and stuffing them in a file such as .ini or .cfg or .ans. This may be called an answer file. Check out yours. Try a /? for help on options.

A2) try appending (randomly) some silencing option, like the /s switch. May be /n for noninteractive mode. Might work even if not documented. Or might get error telling you what valid options are, so you are in business again.

A3) try appending <filename using left angle bracket to indicate an input file. Stuff commands in there, a new file.

A4) see dbrunton. Most often, the program will behave differently from one machine to another, as it runs a discovery process looking for old code or programs it knows it is incompatible with, perhaps bringing up a question on one machine "UpGrade? Or keep old .dll?".

If the program does not use files in \windows, if it does not update registry, your odds of success are better

B) This is too too tricky. Especially for novice or naive like me. But .reg files with commands is one way to do it, once you have fixated exactly what you want to change, providing common platforms. Caution, messing with registry can and will cause problems. What if run on machine that is not exactly identical in every way?

OTOH, for own machine, with physical access, hit shortcut w/ right mouse click, change properties to heart's content. Including the 'Start In'. Why use dos if not have to?
0
 

Accepted Solution

by:
Hypermaniak earned 400 total points
ID: 6347446
Hello, diamond1.

I think I may have a few solutions :O)

A. Depending on the proggy, I think there is a way to "menu drive" a DOS executable in a batch file.  Note that it depends on the program.  You can test to be sure (on most proggys) that this is possible by entering the name of the program followed by either the syntatxes /? or /help or /h, etc.  Some programs do have syntaxes that allow you to skip the menu driven systems altogether (usually for advanced users). e.g. C:\>soundone.exe /?
Usually if there are syntaxes to be allowed by the proggy, then using a help syntax will more often than not, provide a list of the syntaxes and instructions on how to use them.  Then, all you gotta do is incorporate it into the batch file (which is almost like typing in DOS, except everything in a single command and in a sequence events.

B. This is simple (if I understand your question correctly).  Just right-click the desktop shortcut icon and and under properties, insert your path in the specified field.
0
 

Author Comment

by:diamond1
ID: 6348322
Your answer to 'A' is great!  Thank you!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
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…
Suggested Courses

972 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