I am running scripts in Sql server management studio and something is causing SSMS to reset. After some investigation and reading the message that pops up, I run the application from the command line and use the /log switch. reviewing the log I find this error :
PkgDef encountered data collision in section
'HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management
Studio\11.0_Config\CLSID{00a2c8fe-3844-41be-9637-167454a7f1a7}' for
value 'Assembly'
this is just one example...there are many. So I look online for pkgdef troubleshooting tips and found one site...http://blogs.msdn.com/b/visualstudio/archive/2010/03/22/troubleshooting-pkgdef-files.aspx
this told me the following:
Issue: Registry Value Collisions Sometimes the same registry value is
being set by more than one pkgdef file. In other cases, a registry
value is being set, but it’s not clear which pkgdef file is doing it.
You can either scan all of the pkgdef files and discover where the
value is being set. Or use /log again. Remedy: Use /log to discover
which pkgdef(s) set a value To discover all pkgdef files that are
setting a value, use a simple trick: explicitly set that same value by
temporarily changing the master pkgdef (C:\Program Files\Microsoft
Visual Studio 10.0\Common7\IDE\devenv.pkgdef) to explicitly set the
value before all of the other pkgdef files are processed. This will
require Administrator rights to edit the file, but is otherwise
straightforward. Make a backup copy of devenv.pkgdef, then bring it up
in an editor. Below the [$Initialization$] section, add a new section
for the parent key of the value. Then add the key value below it, save
it, and run devenv.exe with /log. The pkgdef loader will log all of
the additional writes to that value, along with the path to the
offending pkgdef.
I found the devenv.pkgdef file but i really don't understand how to modify the file as it suggests.
I would like to know how to modify the file(with example) to find the problem and then to fix it.
Thanks for your patience
Related
i just uninstall oracle 12c manually on windows 10 and now am reinstalling it shows errors:
Cause - Failed to access the temporary location. Action - Ensure that
the current user has required permissions to access the temporary
location. Additional Information:
- Framework setup check failed on all the nodes
- Cause: Cause Of Problem Not Available
- Action: User Action Not Available Summary of the failed nodes desktop-81i87ss
- Version of exectask could not be retrieved from node "desktop-81i87ss" - Cause: Cause Of Problem Not Available
- Action: User Action Not Available
In some cases, there is a possibility that your computer name contains some special character, unique installer throws same error in that case. Try removing any special character by renaming your system to a new name and then try installation again.
For Example: My system had name "LAPTOP-GENCONIAN". Problem was solved for me after renaming to "GENCONIAN"
I come across similar issue and was able to resolve with this method
Open CMD
CD into the folder in which setup file exits
3.Run the command - setup.exe -ignorePrereq -J"-Doracle.install.client.validate.clientSupportedOSCheck=false"
Now the intallation window will open without validation check and you can continue
Create a new file test.bat, the content is as follows:
echo aa;
and execute it in the dos command line,
test.bat
there are no output in the window. But when I tested it in another computer, it outputs
aa
When I double click the bat file, it always disappeared suddenly even I add a "pause" clause line in the test.bat file. Both the systems are Window XP. Can sb tell me where is the problem, please?
I have checked all the things Mofi suggested, but the problem remains.
Now, I divscover when reboot to the system using another Administrator account. All is fine.
So, whether the problem comes from the registry record of the Windows XP?
See my answer on Iterating over files in directory prepends extra character to filename where I have already explained what to check if batch files are not working as expected.
The environment variables ComSpec, PATHEXT and PATH should be verified by you first. And check also the values of registry key Command Processor as explained in referenced answer. Also Autorun value of key Command Processor is very critical.
Further, start Regedit and check standard value of registry key HKEY_CLASSES_ROOT\.bat displayed on right side. It should be batfile. Then go to HKEY_CLASSES_ROOT\batfile, open it and navigate to subkey open - command. The standard value is "%1" %*. It could be that your Windows registry is partly corrupt which makes it not possible to run a batch file by double click.
A check for a problem with registry would be opening a command prompt window by running
C:\Windows\System32\cmd.exe
via Run entry in start menu of Windows. Then run your batch file from within the command prompt window.
You should also run from a command prompt window
C:\Windows\System32\chkdsk.exe C: /F
and confirm running the check disk tool of Windows on next boot of Windows. Then restart Windows to let this tool check the file system for errors resulting in 1 or more corrupt files. If an error was really detected in file system, run after Windows finished starting from a command prompt window
C:\Windows\System32\chkdsk.exe C: /F /R
Confirm running this tool once again on next boot of Windows, but this time with read/write tests on all sectors of your hard disk and repairing sectors if that is possible at all. It can take several hours depending on size of drive C: to finish this task.
Added on 2014-09-28:
Anti-virus application
Do you have checked already the configuration of the anti-virus application?
It could be that it blocks the execution of all *.bat files.
Windows System Restore
Do you have already tried to use Windows System Restore for the account on which batch file execution fails and go back to a restore point of a date on which you are sure that batch file execution worked?
If ntuser.dat or ntuser.dat.log (= registry of current user) is partly corrupt or something is misconfigured in Windows registry for this user account, this would be the easiest method to get back a working environment for the account.
Process Monitor Analysis
As execution of batch files does not work only with one account, the reason must be a corrupt or wrong set key or value in registry of this account.
I suggest to download and run free tool Process Monitor from Sysinternals (Microsoft) using first the account on which batch file execution does not work as expected.
The first displayed on start of this tool is a dialog to configure a filter. Select from first list Process Name, let is selected on second list, enter cmd.exe in edit field, and let Include selected in last list. Click next on button Include and then on OK.
Now in main application window of Process Monitor click on last 3 symbols in toolbar to toggle off those features resulting in monitoring only registry and file system accesses. Clear current list by clicking on fifth symbol in toolbar or by pressing Ctrl+X.
Now double click on your sample batch file in Windows Explorer. Then switch batck to Process Monitor, scroll up to beginning and look line by line what happens on executing of a batch file. Perhaps you can see something which you think is not correct.
The column Result should show only SUCCESS and NAME NOT FOUND and rarely NO MORE ENTRIES for registry entries in log. INVALID in column Result is not good. The log can be saved as CSV file with Ctrl+S or by clicking on disk symbol in toolbar.
Exit Process Monitor, logout from this account, logon on other account, start here also Process Monitor, configure the same filter, execute same batch file and save also this log into a CSV file. Compare the 2 CSV files and look for differences (other than time and line number).
Windows Registry Compare
Another method to find out what is different between the 2 accounts resulting in batch file execution not working is comparing the registry hives of those 2 accounts. In both accounts start Regedit and export entire key HKEY_CURRENT_USER to a *.reg file. Compare the two registry exports with a text comparison tool. The new administrator account has definitely less keys and values. Interesting are those blocks with just similar, but not identical lines.
Most interesting are the keys:
HKEY_CURRENT_USER\Console
HKEY_CURRENT_USER\Environment
HKEY_CURRENT_USER\Software\Classes\.bat
HKEY_CURRENT_USER\Software\Classes\batfile
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
Some keys from this list can be missing completely. That would be okay as in this case the same key under HKEY_LOCAL_MACHINE is taken into account by Windows. But when a key is missing in account on which batch file execution fails, it should be also missing in the other account, or something is wrong here.
What could be a big and hard to find problem is a registry key which is displayed on viewing the registry tree with Regedit, but when clicking on the key it cannot be read.
I have seen such partly corrupt registry keys already several times and it is very hard to fix such a registry error. This happens for example if an application removes a registry key without removing it also from index table of the registry.
Totally unexpected things happen if a registry key is present in index, but does not exist anymore in registry. For example I fixed once an issue where HKLM\Software\Classes\mailto was in index list, but did not exist anymore in registry. When the user clicked on a mailto link, Windows started creating new emails in Outlook in a loop until Windows run out of resources and user restarted Windows.
Please add # before echo, like this:
#echo aa
#pause
Its working in my Windows7 machine.
Trying to delete the following registry key with a batch file but I can't even delete in the registry editor. Any ideas on how to write a batch file to do it, maybe it need to change permission also.
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\SWD\PRINTENUM\
There are about 8 sub keys under PRINTENUM such as {1974F44D-A278-......} that I want to be deleted.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM
Same as above.
I did try psexec -s -i on the server and having the .reg file on the server too, but just couldn't run it on the client with admin command prompt using \server..... tried all sorts of reg import, to running the reg file with -aaceptuela given me error 0 which should be no errors and error 1 which I tried to login using -u to run it or runas etc.,.,
At the end I had to copy the .reg file and psexec to the local hard drive with the script and ran D:\PsExec.exe -i -s -accepteula reg import "D:\hidden_printers.reg" for it to work.
Thanks again.
First, read the Microsoft support article What are Control Sets? What is CurrentControlSet?.
After doing that it should be clear that whatever is modified under HKLM\SYSTEM\CurrentControlSet is in real done (usually) also on HKLM\SYSTEM\ControlSet001 and applied on next boot also to HKLM\SYSTEM\ControlSet002.
Key HKLM\SYSTEM\Select contains the information which control set is the current control set (usually control set 1), which one is the default control set on Windows boot (also usually control set 1) and which one is the last known good (usally control set 2).
Next read the Microsoft developer network article about HKLM\SYSTEM\CurrentControlSet\Enum Registry Tree.
By default only the SYSTEM account has the necessary permissions to change something in enum registry tree. That can be changed with Regedit.exe, but it is not advisable to do that. Enumerator keys are removed automatically on uninstalling a device with it's driver for example with the Windows device manager. It is not advisable to delete them manually from Windows registry.
It is possible to navigate in Regedit.exe to key HKLM\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM, right click on this key, left click on context menu item Permissions, enable full access for group everyone, close the permissions dialog, delete the subkeys, re-open the permissions dialog for the key PRINTENUM again and uncheck full access for everyone to restore the standard permissions. But again, don't do that except you really know what you do.
See super user question Change registry permissions via command line (batch file) containing the answer on your question.
I'm creating an update setup files. In my initial installation, I have an EXE file which is called in [UninstallRun]. In the update, I want to permanently remove this EXE file but it seems to always throw the error "Some elements could not be removed" when I uninstall after the update.
To delete the EXE, I've tried deleting it during the update's [InstallDelete]. This deletes the file, but the error message is still thrown when its uninstalled (even though all files have definitely been removed).
I tried replacing the EXE in the update and using the deleteafterinstall flag, but that didn't make a difference.
If I don't do anything, and just install it, when I run the uninstaller, the EXE file is called, even though the update no longer contains the [UninstallRun] section. So it looks like the initial installation's setup file is being used for the uninstallation part.
For the purposes of this project, I can't change the initial installation, so everything has to be done from the update installation. Is there a way to delete an existing file that was placed in an UninstallRun section?
The issue is that the [UninstallRun] entry from the prior install has already been registered in the uninstall log, so simply removing it from your script won't stop it taking effect, and deleting the file will by default make it generate that error since (presumably) some required uninstall task didn't happen since the file was missing.
Did you remember to put a RunOnceId on the [UninstallRun] entry in the original installer? If so, you can put a "replacement" entry using the same id. You'll still have to make it point at an exe, but you can make it a no-op one, or (better) use Flags: skipifdoesntexist and point it at the one you've removed.
If you didn't use a RunOnceId, then there isn't any way to override the previous entry. You'll just have to put in a dummy exe file that does nothing.
I want to change a particular entry in a trace file. How can I do it?
I have received a set of trace files which were run on the prod server. From these I was trying to get a set of RML files to replay the load on a different environment. To change the .trc files to RML files I ran readtrace.exe
However, readtrace did not output RML files. Looking at the logs I see the following error
06/06/12 15:43:20.914 [0X0000060C] SPID: 118 Seq: 50736293 [Error: 110003][State: 0][Abs Char: 233][Seq: 0] SYNTAX ERROR: String is
missing proper closing quote near (Char Pos: 0x139 Byte Pos: 0x272)
It then clearly shows the entry which is causing this error. While I have sent the bug to the dev team and the fix will go out in the next release, I need to use the current trace file to generate and replay the load. Thus I want to fix the particular entry in the trace file which is causing this error.
Is it possible? I tried opening the trace file in wordpad but wordpad crashed, not surprising that given the trace file is 250MB. Trying to install Vim and see if I can open and change the trace file there, but was wondering if anyone knew of an easier method to do this.
I could not find a way to do this, so finally going the expected way of requesting for a new server side trace, which is taken after the fix has been put.
Before that I did try to load the trace files into a table, then load in profiler and then change the values which I needed and generate a new trace file, but crticial events needed for RML generation are lost when you load to profiler. I also opened a smaller trace file in wordpad and found that I could not edit the contents as there was binary content as well and it wasnt clear what text editing would achieve.
Thus in the end, the only way to get a trace which can generate RML files was to fix the bad query in the code and push the fix and then take the trace once again.