Today encountered a strange problem, the program on the customer's computer to start the time can be run, when opened suddenly prompted "configuration system failed to initialize."
Online search, most of the program's app. config profile error. Because of the program itself, some of the configuration information is not saved by its own definition XML file, but by using the Settings.settings file provided by vs. And we're using the user level to save these configurations. Online search, know that these profiles are saved in the "C:\Documents and Settings\ Current user \local Settings\Application Data\ Program name" directory. And I looked at the user's computer, and did not have our program.
Finally in my local through the program to modify the configuration file, view the last modified file. Find our program placed in "C:\Documents and Settings\ Current user \local Settings\Application Data\microsoft_corporation" because we are developing Excel plugins, So put it in this directory.
Open the corresponding file, delete the corresponding user.config file. Re-run the program, it will work, the problem is resolved.
Send the user's user.config file to me locally, and compare it to my local normal file. Want to see exactly where the problem is. Results The user's profile is garbled after it is opened. Perhaps it is the time to save configuration information when the situation suddenly occurred, resulting in a save interrupt, or perhaps other reasons.
Supplemental: The guest operating system is Win7 and does not have permission to open the Application Data directory. Search for a workaround, attached below:
Method/Step
Create a notepad anywhere on your computer disk, copy the following code (CTRL + C), paste (Ctrl + V) to Notepad to save.
Windows Registry Editor Version 5.00
[Hkey_classes_root\*\shell\runas]
@= "Administrator takes ownership"
"Noworkingdirectory" = ""
[Hkey_classes_root\*\shell\runas\command]
@= "cmd.exe/c takeown/f \"%1\ "&& icacls \"%1\ "/grant administrators:f"
"Isolatedcommand" = "cmd.exe/c takeown/f \"%1\ "&& icacls \"%1\ "/grant administrators:f"
[HKEY_CLASSES_ROOT\EXEFILE\SHELL\RUNAS2]
@= "Administrator takes ownership"
"Noworkingdirectory" = ""
[Hkey_classes_root\exefile\shell\runas2\command]
@= "cmd.exe/c takeown/f \"%1\ "&& icacls \"%1\ "/grant administrators:f"
"Isolatedcommand" = "cmd.exe/c takeown/f \"%1\ "&& icacls \"%1\ "/grant administrators:f"
[Hkey_classes_root\directory\shell\runas]
@= "Administrator takes ownership"
"Noworkingdirectory" = ""
[Hkey_classes_root\directory\shell\runas\command]
@= "cmd.exe/c takeown/f \"%1\ "/r/d y && icacls \"%1\ "/grant administrators:f/T"
"Isolatedcommand" = "cmd.exe/c takeown/f \"%1\ "/r/d y && icacls \"%1\ "/grant administrators:f/T"
Save after pasting, change the name of the Notepad suffix to reg. Click Reg file to run.
Open C:\Users\Dell (This is the user name), each computer takes a different name, open folder is not the same. After opening, locate the application data file, if the folder is not found, the system hides the relevant files, need to open. Action: Open any Disk "click on the menu bar" Tools "Select" Folder Options "click" View "to set the relevant content.
After the above steps, you should be able to see the Application Data folder, right-click, in the popup menu bar Select "Admin Get all Permissions", this option how to not run the first step of the Reg file, there is no.
4, click "Admin Get All Permissions" run, will pop up a DOS window automatically run a series of commands, here can be no matter, wait for the run to finish the line.
5, after running, you can open application data. Similar folders with shortcuts apply to the change method.
Resolve the "configuration system failed to initialize" issue