SOLVED Changing programs directories

Joined
Feb 13, 2018
Messages
4
Reaction score
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!
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
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:
SFC /SCANNOW

Press Enter key to execute

This scan will take a few minutes.

Let us know how you go.​


Regards,

Regedit32
 
Joined
Feb 13, 2018
Messages
4
Reaction score
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.
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
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:
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.​
 
Joined
Feb 13, 2018
Messages
4
Reaction score
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.
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
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​
 
Joined
Feb 13, 2018
Messages
4
Reaction score
0
I installed the windows using iso file and now it's working! Everything is fine. Thank you :).
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top