1

I'm trying to run sconfig, but I get the error:

CScript Error: Execution of the Windows Script Host failed. (The system cannot find the file specified.)

ERROR: The system was unable to find the specified registry key or value.

Running Server Core 2012 R2 on a Dell pc

Rohit Gupta
  • 3,499
ampost
  • 11

3 Answers3

0

Rebuilding the WMI Repository

For Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2, you can run

winmgmt /verifyrepository from a command prompt.

For Older OS like Windows XP and Windows Server 2003 run: WmiDiag tool with the checkconsistency option. For example: WmiDiag checkconsistency

If repository is found to be inconsistent:

a. For Vista and newer, run from elevated command prompt:

Winmgmt /salvagerepository

Note this command will take the content of the inconsistent repository and merge it into the rebuilt repository if it is readable

If the above doesn’t work, then run:

Winmgmt /resetrepository

Note this will reset repository to the initial state when the OS was first installed

0

I just had the same. Did you by chance install in a different language than en-US?

I have to open it from c:\windows\system32\de-DE\.

Excellll
  • 12,717
fr43nk
  • 1
0

This seems to be a recurrent problem with other languages installs. E.g. I have the spanish version, same error cannot find sconfig.vbs but it searches in this path: \windows\system32\en-US\

Trick: Go to your language path, e.g. \windows\system32\es-ES\ and copy the sconfig.vbs to the \en-US\

sconfig should run now from powershell

Comment: This is why I hate installing in other languages, and I can't believe MS is so lazy. An older problem was trying to copy AD from Windows Server 2003 English to another 2003 but Spanish -> it never worked. But from Eng to Eng it was perfect.