Batch file to install software silently (or without user interaction) - batch-file

I am trying to make batch file for installing software silently. Is there a way to make it automatically select Next and Finish during the installing process?

We need more details to answere your question. what is exactly sw?? is it shockwave player, in this case follow these instructions http://kb2.adobe.com/cps/195/tn_19572.html by adding the /s argument.

Usually with most programs you can add the command /silent or /verysilent when installing them through the command line. I know this works with UltraVNC. If it is your own program then you would have to add that option using Inno Setup or something like that.

If the application does not support silent installation, you will need to look at something like AuotIt. You can use it to automate pressing buttons and entering keystrokes.

Related

run cygwin command through batch file

I am running a rsync ssh command in cygwin in windows. Upon this, password is asked and if given, it does the intended task. Now I want to put these all tasks in one batch file, which can be run on one click.
Thanks
Step 1: Set up an authorized_keys file on the server so that you can ssh in from your local machine without using a password (check the security implications of this carefully). You can find instructions for this in many places, including the official documentation.
Step 2: Add Cygwin's bin directory to your Windows PATH environment variable. If you don't want to do it permanently, you could write that into your batch file.
Step 3: Write your one-line batch file using the exact same rsync command line you used in Cygwin. Pathnames should not need translating unless you expect the shell to expand a wild card. If you use any sort of quoting then that might need adjusting.
Step 4: Configure Windows to run programs with one click, instead of double click. Not sure how you do that; I don't use Windows much.

Possibly to run silent and verysilent from within the application

Is it possible to run the silent and verysilent option from within the inno setup application.That is as soon as I clicked the exe it will run with verysilent option (no need to provide it in the command prompt)
I have figured out the temporary way of putting the command with verysilent option in the batch script and clicking the batch script :) !
It is Bad Formâ„¢ make a "covert" installer. From Inno's FAQ:
Is it possible to do a silent install without using the /SILENT or /VERYSILENT command-line parameters?
No, nor is such a feature planned (it would be abused). If it is your intention to keep user interaction to a minimum, use the Disable* [Setup] section directives.
This would only matter if you are actually building the installer. If you're just trying to install the application, the only sensible thing to do is use the command-line flags in a batch file (or other scripting language).

Batch install to specific location

I was having trouble after creating a windows service in c# with creating a silent install with a batch file or w.e. is needed that takes in just the location of the install, as when I run setup.exe or the msi file that is all that's in there. It will prompt to change location if desired, otherwise go to default C:\drive folder that is preset within the service, no other options are required.
I was wondering how to use a iss file or an answer file to create either a cmd prompt or script to mass install on many computers easily.
Currently setup.exe accepts in the cmd setup.exe /quiet instead of what I have been seeing -s or /s which also had caused some confusion and to why I was looking for help. Thank you.
Ok. I typically use InstallShield for that. If you are doing this in pure batch, then you will need to take steps to configure/start the service. See SC /?. That will allow you to query the service, stop, start, etc. Give it a try and reply with more specifics if needed.

Execute a program with a custom .ini path

I make a fair amount portable Apps for personal use and they work perfectly for the most part. I do, however, find it quite frustrating that if I run them on another computer none of my preferences are retained, as a program always looks in appData for the configuration files (which obviously don't exist on another system), so I'm wondering whether there is some kind of command line to launch an .exe with a custom .ini location.
I'm asking this firstly because Google has proved fruitless (once again) and secondly because I know it's possible - I've actually done this before, but with only one of my Apps. I accomplished this by launching the App via the command programFile.exe -f configFile.ini /s (I have also seen programFile.exe -d -f configFile.ini /s elsewhere). Naturally, I thought I would try to apply this to some other Apps but it seems it only works for that particular App.
So, is there a command/switch that I am unaware of that will do this for an .exe file?
Thanks
It really depends on each executable file you are using. Some have support for what you are looking for, and some don't. Some programs don't even use .ini files. What you should look for is if each and every program you use have support for user data custom location.
Edit
The only case where generic arguments would be avaialble for a group of EXE files is if they are generated with the same tool, which automatically provides these arguments for you. InstallShield and MSI install programs have that kind of feature (with the silent install and automated installation for instance).
I suggest you look into the tool you are using to generate your portable Apps, and see if it does provide those generic arguments for you, and how they work. If it does not have that feature, then look into the Apps you were able to specify a custom location for your INI file. Somewhere into the code, there must be a piece of code that handles the arguments you specify to the EXE file and handles them. You should share that piece of code with your other Apps, to make sure they provide the same arguments list.

Calling Tortoise from command line and build if new code (how to know if tortoise updated anything)?

I am writing a batch file which is supposed to update the source files from tortoise and - if anything new was gotten - build the solution. Should be a very simple task.
My batchfile looks like this (I've removed the non-essentials)
set updatepath=%1
set solution=%2
set output=%3.txt
call TortoiseProc.exe /command:update /path:%updatepath% /closeonend:2
call %devenv% %solution% /Build Debug /Out %output%
Now, I'd like to know if tortoise actually got new code for me and the not build if it didn't. How do I do this?
I am running Windows Vista
(The batch script is called from another batch script about 7 times - one for each project I need updated and - perhaps - build).
Using tortoise is probably not the best way to resolve the problem.
To begin with, it would help knowing which SCM you're using (Mercurial, Subversion, CVS...). Most (all?) SCM tools come with a command-line interface, as opposed to the tortoise shell extension. If you used e.g. mercurial, this is how you would check if the local files need updating:
d:\projects\myproj> hg incoming <main repository path>
You could then parse the output to check if there are pending changes. A similar approach would work with other SCMs.
TortoiseProc is not meant for this kind of automation:
Remember that TortoiseSVN is a GUI client, and this automation guide
shows you how to make the TortoiseSVN dialogs appear to collect user
input. If you want to write a script which requires no input, you
should use the official Subversion command line client instead.
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-automation.html
So, first, get the command line client ( SlikSVN is my favourite). Note that update in TortoiseProc doesn't bring the dialog in the way you are using, but calling it seven times, you are better off using svn command line client.
Second, use svn status -u to see if there are updates in the repo. --show-updates or -u places an asterisk next to items that are out of date. You can probably grep it.
If so, use svn update to update your working copy.

Resources