DISM/SFC-Scannow Command Prompt Tool not creating 'SFC Detail file..

Page 2 of 4 FirstFirst 1234 LastLast
  1. gahbmwm5's Avatar
    Posts : 42
    Windows 10 x64 Version 2004
    Thread Starter
       #11

    DISM/SFC-Scannow Command Prompt Tool not creating 'SFC Detail file..-2020-03-07.png
      My Computer

  2. Kyhi's Avatar
    Posts : 3,545
    Windows 3.1 to Windows 10
       #12

    Kyhi said:
    open cmd prompt and type
    echo %userprofile%
    I see powershell is not pulling the system variable

    DISM/SFC-Scannow Command Prompt Tool not creating 'SFC Detail file..-image013.jpg

    I use a Local Account - Not a MS-Account
    Not sure that a reason, as I am not a MS-Account user..
    I prefer my account local - rather then in a cloud - where only god knows where..
      My Computer

  3. Kyhi's Avatar
    Posts : 3,545
    Windows 3.1 to Windows 10
       #13

    @Try3
    %userprofile% is referenced several times in the Batch...
    As I used a local variable...
    I believe you could edit that variable and allow for a search variable just prior to :menu
    Please share your results...
      My Computer

  4. Try3's Avatar
    Posts : 7,432
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #14

    Kyhi said:
    @Try3
    %userprofile% is referenced several times in the Batch...
    As I used a local variable...
    I believe you could edit that variable and allow for a search variable just prior to :menu
    Please share your results...
    Kyhi,

    Yes, indeed.

    What I'm suggesting is, before your set "params=%*" line, insert these lines
    Code:
    :: Extract the Registry entry for the Desktop folder [Current user]
    For /F "usebackq tokens=3 " %%X in (`Reg Query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop`) Do Set DesktopFolderRaw=%%X
    :: Resolve a result that contains a variable such as %UserProfile%
    For /F "usebackq delims=" %%Y in (`Echo %DesktopFolderRaw%`) Do Set DesktopFolder=%%Y
    and then use the variable
    %DesktopFolder%
    in the rest of the tool in place of your current
    %userprofile%\desktop

    Denis
      My Computer

  5. Kyhi's Avatar
    Posts : 3,545
    Windows 3.1 to Windows 10
       #15

    Please feel free to edit batch and share your results...
    I am more into Windows Rescue Media - as that is a old batch file and not present day...

    Please make a note at end of batch and change title date....
      My Computer

  6. gahbmwm5's Avatar
    Posts : 42
    Windows 10 x64 Version 2004
    Thread Starter
       #16

    Hey Try3 and Kyhi,

    Thanks a ton gents, as I'm quite a PC enthusiast (AsusTec Strix 17 GL 703GE Rogers Gamer, Nvidia GeForce GTX 1050 Ti,,nice, however the coding....lol
    I will be following this thread.
      My Computer

  7. Superfly's Avatar
    Posts : 3,328
       #17

    gahbmwm5 said:
    DISM/SFC-Scannow Command Prompt Tool not creating 'SFC Detail file..-2020-03-07.png

    Just a heads up - environment variables are interpreted differently by PS - it uses prefix $env:

    So %userprofile% = $env:USERPROFILE
      My Computer

  8. Try3's Avatar
    Posts : 7,432
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #18

    gahbmwm5 said:
    Hey Try3 and Kyhi,

    Thanks a ton gents, as I'm quite a PC enthusiast (AsusTec Strix 17 GL 703GE Rogers Gamer, Nvidia GeForce GTX 1050 Ti,,nice, however the coding....lol
    I will be following this thread.
    I think that your OneDrive changes might have relocated some of your user folders. There are lots of ways to check but just for speed of explanation, save this code as a batch file and run it

    ShowUserDesktop.bat
    Code:
    :: Extract the Registry entry for the Desktop folder [Current user]
    For /F "usebackq tokens=3 " %%X in (`Reg Query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop`) Do Set DesktopFolderRaw=%%X
    :: Resolve a result that contains a variable such as %UserProfile%
    For /F "usebackq delims=" %%Y in (`Echo %DesktopFolderRaw%`) Do Set DesktopFolder=%%Y
    @echo The DesktopFolder is %DesktopFolder%
    Pause and check the path of the DesktopFolder
    and just see what is shown in the line beginning The DesktopFolder is

    I'd also still like to check about which admin account you have been using. When you have to give admin permission to proceed do you just click on a Yes button or do you have to supply the password of a [separate] admin account?

    Denis
      My Computer

  9. Try3's Avatar
    Posts : 7,432
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #19

    Superfly said:
    Just a heads up - environment variables are interpreted differently by PS - it uses prefix $env:

    So %userprofile% = $env:USERPROFILE
    Agreed. To display many of these variables in PowerShell, you just have to enter this [without even having to use echo before them]
    [environment]::GetFolderPath('Desktop')
    [environment]::GetFolderPath('MyMusic')
    [environment]::GetFolderPath('MyVideos')
    [environment]::GetFolderPath('MyPictures')
    [environment]::GetFolderPath('MyDocuments')
    $env:computername
    $env:userprofile

    I have never managed to find out how to get a similar PS command to report the path of the Screenshots folder and, if I needed to do so, I'd have to rip it from the Registry.

    Denis
      My Computer

  10. gahbmwm5's Avatar
    Posts : 42
    Windows 10 x64 Version 2004
    Thread Starter
       #20

    Hi Try3,

    Thanks so much now the 'silly question' is how do I save the above code as a batch file?

    and just see what is shown in the line beginning The DesktopFolder is

    The admin account has all permissions as well as %username%----->Click on properties of file/app----->check security...
      My Computer


 
Page 2 of 4 FirstFirst 1234 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 20:41.
Find Us




Windows 10 Forums