0

I have a batch file that is running a lot of other programs lets call it "installer.bat" the installer calls plenty other programs that writes a lot of information to the console that maybe not needed at the time of installing but it could be necessary to later use when some sh*t happens. My problem is that I need to run this file as administrator pivilages with "runas" command and i would like to save all the console informations to a file BUT I need to see the informations during install on screen too because password can be needed etc. Anyone do know a way to do this? Any help appreciated cause this drives me crazy.

user3219009
  • 19
  • 1
  • 6
  • Possible duplicate: http://stackoverflow.com/questions/503846/how-do-i-echo-and-send-console-output-to-a-file-in-a-bat-script – cdm Apr 08 '16 at 07:28

1 Answers1

0

Write it in a file with

TextTextText > file.txt

Or i.e.

set text=thisIsMyText
set file=file.txt
%text% > %file%

You can use every variable you want.

Hradschek
  • 11
  • 2
  • > will just redirect the output to the file. Please explain to me how will I be see if the installer asks for admin password? :) – user3219009 Apr 08 '16 at 14:13