Possibly to run silent and verysilent from within the application - batch-file

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).

Related

background process launched by TFS is killed when switching to next step

I have some trouble keeping alive a background process when launched by TFS.
Usually I use a batch that launch a java server (new window), as long as I keep this window open it works properly.
C:\Users\TFSService\mbs-iot-sdk\osgi\bin\vms\jdk\server.bat
In order to make my process automatic, I include this in TFS. In the step I call a batch that contains the following:
cd C:\Users\TFSService\mbs-iot-sdk\osgi\bin\vms\jdk // necessary to find the batch
start C:\Users\TFSService\mbs-iot-sdk\osgi\bin\vms\jdk\server.bat
In my task manager, I can see in background tasks that java is launched (no new window is opened), exactly as it behaves when launching directly the batch. But after a few seconds, when TFS switches to the next step, it stops.
Then the next step carries on but fails as it requires the server to be launched.
Is there a particular way of doing it in TFS ?
thank you
Alexandre
It's suggest to launch the .bat file from a relative path not directly use cd to hard code the path.
Also recommend you to use Run Batch File task not Run Command Line task to launch the .bat file.
According to your description, seems you are using a run command line task in your build pipeline. Then run the command under the working directory c:\Build_work\5\s, the command cd to C:\Users\TFSService\mbs-iot-sdk\osgi\bin\vms\jdk\ on the build agent, find the server.bat, run the server.bat.
First check if the .bat file is located at the path you are specifying on the build agent. Not sure if the bat file have to run under C:\Users\TFSService\mbs-iot-sdk\osgi\bin\vms\jdk\, guess you are also hard code the path in your server.bat file. Suggest you change all the path to relative path, you could use some built-in variable in TFS.
As for your workaround in comment, seems you want to chain builds in TFS. The official docs literally say "not yet" and have a uservoice in planed. However you could use some workaround, such as create or use other's customize extension (use rest api) to call another build. Detail ways please refer huserben's answer in this question: How to chain builds in TFS 2015?
Note sure you have to go deep into this area for your original issue. Just add some related info in case you are interested or need.
Well,
Just in case someone else goes through the same kind of issue, I found a workaround:
I wish to mix different command line steps, some of them launching Python scripts:
I have one step for launching the server that is required for my testing tool, one step for my testing tool and one Python step for differential testing
I realized that I could embed everything in a Python script.
It can handle server launching process in a separate window (with subprocess), launch my Python part and launch another process for my validation tool.
I have to test the whole chain but, at least, I solved my problem of launching a background process and detach it from TFS

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.

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.

Make a Single EXE from BATCH and 2 EXEs

I have a script (a.bat) that calls 2 executables (b.exe and c.exe) and I would like to create a single exe that would call a.bat automatically.
Is it possible?
Any simple program to do this?
Ps.: Info: The Exe's do make other files that are deleted in the end
Not directly, no.
The simplest way to accomplish this with off-the-shelf tools is to use an archiver that can create self-extracting archives and allows to specify a file to run after extraction. For example, free Info-Zip tools support an autorun command. WinRAR (commercial) allows to define complex scripts with GUI.
An install engine can be used for the same purpose. For a couple of examples, there are NSIS and Inno Setup (both free).
A (relatively) more complex solution is to write a third executable that will extract payload from its resources and run the batch file. This way you have full control over what happens.
This One:Bat To Exe Converter
It has the "Include" option that can include the exe file
when the compiled exe file run
it will release it
and you can run it!

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

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.

Resources