none
How to use Windows 10 iso command prompt and save commands and results RRS feed

  • Question

  • In the Windows recovery environment (using a Windows 10 iso) what methods can be used to copy and paste and save commands and results to a file so that the file can be viewed after the underlying problem is fixed?

    For example, a computer has problems booting.  A Windows 10 iso is used.  Command prompt commands are ran.  The command prompt commands may not fix the underlying problems.  How can the command prompt commands be copy and pasted and then saved to share with others?

    Alternatively, the command prompt commands may fix the underlying problems.  How can the command prompt commands be copy and pasted and then saved to share with others?

    The current method being used is a camera.  What methods are available that do not include a camera and include the typical file save method?

    Monday, March 26, 2018 3:11 AM

All replies

  • In the Windows recovery environment (using a Windows 10 iso) what methods can be used to copy and paste and save commands and results to a file so that the file can be viewed after the underlying problem is fixed?

    I think clip will be there.  If you could have PowerShell ISE would be there.

    BTW have you seen this

    https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-adding-powershell-support-to-windows-pe 

    Surely that would have potential for doing even more at the command line.



    Robert Aldwinckle
    ---

    Monday, March 26, 2018 6:59 PM
  • There are many that have computer problems where they cannot boot.

    To troubleshoot a Windows 10 iso is often necessary.

    Running command prompt as Administrator: X:\Windows\system32\cmd.exe > X:\Sources>

    may fix many problems.

    When running the commands an OP may report problems and it is unclear what they typed.

    There could be typos.

    So using a camera or smart phone may be used.  Then images are posted into the thread.

    However Technet has approximately a 2 week wait before OP are approved to post images or share links into the thread.

    So those with acute problems may not be able to helped during the 2 week waiting period.

    Notepad can be opened in the Windows PE environment.  So am wondering how to save a notepad Windows recovery file so that it can be pasted into the thread.

    Monday, March 26, 2018 8:08 PM
  • wondering how to save a notepad Windows recovery file so that it can be pasted into the thread.

    Just save it to a drive other than X: 

    fsutil fsinfo drives

    works in there if they need a list of drive letters.  Oddly it doesn't list X: (probably because it isn't real?)



    Robert Aldwinckle
    ---

    Monday, March 26, 2018 9:22 PM
  • Found a thread at another site by searching for "command prompt echo console to file"

    (Can't insert link)

    Toward the end of the comments, a relatively simple solution was to append the command with " > file.txt | type file.txt"

    so the dir command would become:

    dir > file.txt | type file.txt

    you would need a different filename for each command. Since you would probably want to prepend the filename with a path, you could set a variable with the path and filename and append numbers and .txt.

    set fn=c:\mylog

    dir > %fn%1.txt | type  %fn%1.txt

    Keith


    Keith

    Tuesday, March 27, 2018 2:04 AM
  • I was not able to follow the above comments.

    Once the commands and results are seen in either administrative command prompt or Windows recovery Administrator: X:\windows\system32\cmd.exe the files can be manually copied and pasted into notepad.  A new folder was created and then when I booted back into windows I did not see the file.

    So I was puzzled about whether a file save works or does not work in Windows recovery.  I had used 2 flash drives.  One was for the windows 10 iso and one was a blank drive.  Multiple drives were not tried but the drive that was used did not have the files.

    If the command that you are using saves it to the C: then how would you view the file when the drive is not bootable?

    Tuesday, March 27, 2018 2:12 AM