Search found 128 matches

by elzooilogico
25 May 2022 15:10
Forum: DOS Batch Forum
Topic: Batch running files remotely
Replies: 5
Views: 6657

Re: Batch running files remotely

you may try

Code: Select all

wmic /node:"some_computer" proccess call create "c:\\path_to_proccess\\your.exe
by elzooilogico
02 Mar 2022 15:55
Forum: DOS Batch Forum
Topic: Fail at set batch with Admin Rights and put the computer at Domain
Replies: 2
Views: 3446

Re: Fail at set batch with Admin Rights and put the computer at Domain

some thoughts first, as you’ve stated, your script opens multiple windows, what is your script name? it’s trying to call/use some command with the same name? also, you must add computers to trusted server list, in order to use remote admin using wmi or powershell (this last not sure, but the first i...
by elzooilogico
13 Jan 2021 11:24
Forum: DOS Batch Forum
Topic: Need help running imagemagick command over many files
Replies: 9
Views: 7637

Re: Need help running imagemagick command over many files

well, if you run from explorer, then place

Code: Select all

1>nul
in front of

Code: Select all

convert "%~1" -resize 300 "%output_name%"
inside your script, so

Code: Select all

@echo off
...
...
1>nul convert "%~1" -resize 300 "%output_name%"
...
...
by elzooilogico
13 Jan 2021 09:29
Forum: DOS Batch Forum
Topic: Need help running imagemagick command over many files
Replies: 9
Views: 7637

Re: Need help running imagemagick command over many files

did you try

Code: Select all

1>nul scriptname input.jpg -resize 300 output.jpg
where scriptname is you actual script?
by elzooilogico
13 Jan 2021 05:03
Forum: DOS Batch Forum
Topic: Need help running imagemagick command over many files
Replies: 9
Views: 7637

Re: Need help running imagemagick command over many files

you may run your script

Code: Select all

1>nul convert input.jpg -resize 300 output.jpg
this will suppres any normal output while errors should be displayed
by elzooilogico
28 Sep 2020 03:34
Forum: DOS Batch Forum
Topic: How to remove Quotes from a variable with "ampersand" (&) ?
Replies: 1
Views: 3254

Re: How to remove Quotes from a variable with "ampersand" (&) ?

you can use a for loop to remove quotes with the ~ modifier. see for /? for further information.

Code: Select all

for %%a in (%dir%) do echo %%~a
by elzooilogico
17 Sep 2020 03:41
Forum: DOS Batch Forum
Topic: How to pass "chcp 1252" command to START "" /B /WAIT program?
Replies: 4
Views: 5385

Re: How to pass "chcp 1252" command to START "" /B /WAIT program?

have you tried

Code: Select all

start "" /NORMAL /B /WAIT ">nul chcp 1252 & D:\foobar\myprog.exe /parm1 /parm2 someparm”
by elzooilogico
28 Aug 2020 08:26
Forum: DOS Batch Forum
Topic: SerialPort copy string instead of file
Replies: 5
Views: 5278

Re: SerialPort copy string instead of file

have you tried

Code: Select all

echo hello>COM3
or

Code: Select all

set /p str=“hello" <nul >\\.\COM3
the diference here is that first writes hello plus CR+LF, and the second one does not.
by elzooilogico
05 May 2020 14:37
Forum: DOS Batch Forum
Topic: Depicus wake on lan batch file question
Replies: 3
Views: 4948

Re: Depicus wake on lan batch file question

that's what pause command does, wait for user to press a key. simply change

Code: Select all

pause
to

Code: Select all

timeout /t 2
to wait two seconds
by elzooilogico
20 Apr 2020 09:11
Forum: DOS Batch Forum
Topic: How to disable Avast until reboot
Replies: 7
Views: 6967

Re: How to disable Avast until reboot

aren't those procceses (or at least one of them) services?

in that case you need

Code: Select all

sc stop ""ServiceName"
or

Code: Select all

net stop "ServiceName"
by elzooilogico
06 Apr 2020 09:12
Forum: DOS Batch Forum
Topic: Windows Batch - Print line file containing exclamation mark
Replies: 6
Views: 7020

Re: Windows Batch - Print line file containing exclamation mark

disable delayed expansion, unless you are doing something with sLine you don't need it, change set "sLine=%%A" echo !sLine! to echo %%A or use call set "..." call echo %...% ro reflect changes in a block of code you cannot do string proccessing with for variables, but you can turn off delayed expans...
by elzooilogico
02 Mar 2020 13:01
Forum: DOS Batch Forum
Topic: [SOLVED] Extract each whole line that contains a specific word.
Replies: 8
Views: 9254

Re: Extract each whole line that contains a specific word.

Code: Select all

for /f "delims=" %%i in ('findstr "\<true\>" "MyFile.wccf"') do echo %%i
if you are running it in a batch script

Code: Select all

for /f "delims=" %i in ('findstr "\<true\>" "MyFile.wccf"') do echo %i
if you run it in command line
by elzooilogico
31 Oct 2019 11:01
Forum: DOS Batch Forum
Topic: Batch script to login to multiple windows server
Replies: 8
Views: 13647

Re: Batch script to login to multiple windows server

with cmdkey yoy can store credentials to access computers over the net. read the cmdkey command help. long ago I used a batch script which executes cmdkey and wmic to run proccesses and fetch its output over many servers. no need to logon, nor any user session on remote server, provided not gui app ...