Questions tagged as 'batch'

1
answer

What is the best way to test ERRORLEVEL in batch?

I have already seen several ways to test ERRORLEVEL in batch scripts. Some of them are dangerous and others are wrong, but sometimes they go unnoticed. Here are some examples I know:    Dangerous: The test works as "greater than or equ...
asked by 10.03.2017 / 18:59
1
answer

JRE 8, TDM-GCC MinGW: Silent installation

Does anyone know how to silently install JRE 8 (jre-8u65-windows-i586) via a bat file? And if possible, could you also tell me how to install TDM-GCC (MiNGW32) in the same way? For these two I have already tried a bat file: "name of pro...
asked by 10.02.2016 / 21:54
1
answer

How do I give an echo without a line break?

I have this line in the file .bat for /L %%a in (1,1,3)DO echo %%a What prints:    1       2       3 But I want you to print on the same line, this way:    1 2 3     
asked by 22.09.2014 / 16:35
1
answer

How do I make a batch file run an Application Console passing parameter?

I have an Application Console that the% method of Program.cs (where it starts the application) receives an input . Follow the code below: static void Main(string[] args) { var input = Console.ReadLine(); ControleEstado.IniciaCo...
asked by 28.04.2015 / 18:26
1
answer

How to run an R script from the WIndows command line?

I have a test.r file in the folder: C: \ Users \ Documents \ R And I already added the R in the windows PATH: C: \ Program Files \ R \ R-3.0.2 \ bin When in cmd I try the command R CMD teste.R Windows does not know which program to use...
asked by 22.02.2014 / 14:37
1
answer

How can I run my script making sure it was run as managed?

I want to run a batch (.bat) and check if it was opened as an administrator, here is an example of what I want in linux: if [ 'whoami' == 'root' ] then echo I am root else echo I am not root fi I searched but only found these method...
asked by 13.09.2017 / 23:03
1
answer

Open multiple programs in different workspaces using script in windows 10

I'm wanting to open some programs on different work screens that I have to use frequently. And I wanted to know how I make a script to automate this. I made a small, simple .bat script to make it easier echo Abrindo o Netbeans start /d "C:\...
asked by 24.08.2017 / 21:22
1
answer

Store user logged in .bat variable

I have to create a bat to automate the installation of the company's standard programs, but one in particular is giving me a headache. The installer of one of the programs, by default, creates the path C: \ app \ client \\ product \ 12.1.0 \...
asked by 18.04.2017 / 16:02
2
answers

Bat file to run file.r

I would like to use a .bat file to run a particular .r file daily with the windows taskmanager, but I can not get it to run. My steps: 1) open notepad 2) enter code, which is currently: "C:\Program Files\R\R-3.3.0\bin\i386\Rscript.exe" -...
asked by 10.04.2017 / 21:07
2
answers

Batch to choose drive letter

I'm creating a menu for deploy images via winpe . Within this one I squeeze some commands and apply them to files that are stored on an external hard drive. I even managed to make a if exist c:\IMG GOTO and then proceed with the sc...
asked by 31.01.2015 / 04:40