Changing programs directories

SOLVED Discussion in 'Crashes, BSODs and Debugging' started by taha, Feb 13, 2018.

  1. taha

    taha

    Joined:
    Feb 13, 2018
    Messages:
    4
    Likes Received:
    0
    Recently, I can't open any program that is in windows 10 such as paint, Microsoft edge,... . When I was looking for the problem, I realized that when I open properties for each program, the directory is like %windir%\system32\... . But, when I change %windir% to C:\Windows the problem will be fixed for that program.
    This problem has destroyed my windows, and I can't do anything!
     
    taha, Feb 13, 2018
    #1
    1. Advertisements

  2. taha

    Regedit32 Moderator

    Joined:
    Mar 4, 2016
    Messages:
    2,932
    Likes Received:
    896
    Hi taha,

    Welcome to the Forum.

    %windir% is an environmental variable that will point to the Windows directory on the System Root path [i.e. the drive letter of the partition containing the Windows Operating System, typically C:\ ]

    Thus System files such as Paint will have a environmental path of %windir%\system32\mspaint.exe

    This is the same as saying C:\Windows\System32\mspaint.exe [assuming Windows is installed on the C partition.


    Given your issues I'd recommend running a System File Check as it seems you may have one or more System files that are corrupted. To do this:
    • Press Windows key + S together to give focus to your search field
    • In the search field type command
    • In the search results right-click on Command Prompt and select Run as administrator
    • Click yes when the User Account Control prompts you
    • In the Administrator: Command Prompt console type the following:
    Code (Text):
    SFC /SCANNOW
    Press Enter key to execute

    This scan will take a few minutes.

    Let us know how you go.​


    Regards,

    Regedit32
     
    Regedit32, Feb 13, 2018
    #2
    Ian likes this.
    1. Advertisements

  3. taha

    taha

    Joined:
    Feb 13, 2018
    Messages:
    4
    Likes Received:
    0
    Hi
    Thank you for your respond. I did what you said and the bellow message was shown after that.
    Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not supported in offline scenarios.
     
    taha, Feb 15, 2018
    #3
  4. taha

    Regedit32 Moderator

    Joined:
    Mar 4, 2016
    Messages:
    2,932
    Likes Received:
    896
    The next step then would be to attempt to clean the disk image.
    • Press Windows key + S to give focus to the search field
    • Type Command in the search field
    • In the search results right-click on Command Prompt and select Run as administrator
    • Click Yes when the User Account Control prompts you
    • In the Administrator: Command Prompt console type or copy & paste the following:
    Code (Text):
    dism /online /cleanup-image /restorehealth
    Press Enter key to execute.

    Note: This may take some time depending on how many files are affected.

    Report back on how you go.​
     
    Regedit32, Feb 16, 2018 at 10:21 PM
    #4
  5. taha

    taha

    Joined:
    Feb 13, 2018
    Messages:
    4
    Likes Received:
    0
    It completed until 85.3% then this message appeared;
    error: 0x80080005
    DISM failed. No operation was performed/
    For more information, review the log file.
    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log.
     
    taha, Feb 17, 2018 at 4:42 PM
    #5
  6. taha

    Regedit32 Moderator

    Joined:
    Mar 4, 2016
    Messages:
    2,932
    Likes Received:
    896
    That really leaves two options then:
    1. Download a matching Windows 10 iso file and do an in-place upgrade [install windows over the top of existing copy while keeping personal files and settings ], or
    2. Slip streaming the iso file [ adding additional updates to the iso file ] then mounting this image to try again with the /restorehealth command.
    Let me know which option you prefer and I can explain how. Also, if you could confirm which build and architecture you are currently using for Window 10? e.g. Windows 10 Home, Version 1709, Build 16299,248, 64-bit​
     
    Regedit32, Feb 18, 2018 at 8:52 PM
    #6
  7. taha

    taha

    Joined:
    Feb 13, 2018
    Messages:
    4
    Likes Received:
    0
    I installed the windows using iso file and now it's working! Everything is fine. Thank you :).
     
    taha, Feb 19, 2018 at 7:00 PM
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.