Solved

Install program from batch file or alter shortcut properties

Posted on 2001-06-29
4
375 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 48

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 100 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

Gigs: Get Your Project Delivered by an Expert

Select from 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

Suggested Solutions

Title # Comments Views Activity
Filter echo results from batch file output 7 64
Help with a batch file 13 82
Check Disk (CHKDSK) on all volumes and fix if needed. 8 186
Batch file or script with password 22 38
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…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

20 Experts available now in Live!

Get 1:1 Help Now