Apr/102
Windows 7: Desktop Icons suddenly disappear
I love Windows 7! It’s robust, fast, looks great and command lines / power shell / wmi / scripting platforms are just awesome.
In other words: It kicks the hell out of a Banana (or some other proprietary fruit I can’t remember).
However, there still are some little things that cause headache: Why would anyone do this!?
This is what I thought after my desktop shortcuts disappeared for the 3rd time after a while being unused.
Turned out there is a maintenance Task that runs as a Scheduled task under Windows 7. It executes various powershell scripts including this:
%windir%\diagnostics\scheduled\Maintenance\
RS_RemoveUnusedDesktopIcons.ps1
If you comment out line 57, you should be good to go and your Desktop Icons won’t disappear anymore:
Replace “Remove-FileList $deleteList”
with “# Remove-FileList $deleteList”
Note: To edit the file you must first take ownership and grant you permissions to it!
Hope that helps…
469 views
Apr/102
“vssadmin list writers” does not return any writers
If you get one of the following events in your Application Event Log, try the solution below:
Event Type: Error
Event Source: VSS
Event ID: 20
Description: Volume Shadow Copy Service error: A critical component required by the Volume Shadow Copy Service is not registered. This might happened if an error occurred during Windows setup or during installation of a Shadow Copy provider. The error returned from CoCreateInstance on class with CLSID {faf53cc4-bd73-4e36-83f1-2b23f46e513e} and Name VSSEvent is [0x80040154].
Event Type: Error
Event Source: VSS
Event ID: 20
Description: Volume Shadow Copy Service error: A critical component required by the Volume Shadow Copy Service is not registered. This might happened if an error occurred during Windows setup or during installation of a Shadow Copy provider. The error returned from CoCreateInstance on class with CLSID {faf53cc4-bd73-4e36-83f1-2b23f46e513e} and Name VSSEvent is [0x80004002].
Event Type: Error
Event Source: VSS
Event ID: 8193
Description: Volume Shadow Copy Service error: Unexpected error calling routine CoCreateInstance. hr = 0×80040154.
Event Type: Error
Event Source: VSS
Event Category: None
Event ID: 8193
Description: Volume Shadow Copy Service error: Unexpected error calling routine CoCreateInstance. hr = 0×80004002.
Event Type: Error
Event Source: VSS
Event ID: 12302
Description: Volume Shadow Copy Service error: An internal inconsistency was detected in trying to contact shadow copy service writers. Please check to see that the Event Service and Volume Shadow Copy Service are operating properly.
Solution:
Click Start, click Run, type cmd, and then click OK.
Type the following commands at a command prompt. Press ENTER after you type each command.
cd /d %windir%\system32
Net stop vss
Net stop swprv
regsvr32 ole32.dll
regsvr32 oleaut32.dll
regsvr32 vss_ps.dll
vssvc /register
regsvr32 /i swprv.dll
regsvr32 /i eventcls.dll
regsvr32 es.dll
regsvr32 stdprov.dll
regsvr32 vssui.dll
regsvr32 msxml.dll
regsvr32 msxml3.dll
regsvr32 msxml4.dll
cd /d %windir%\system32
Net stop vss
Net stop swprv
regsvr32 ole32.dll
regsvr32 oleaut32.dll
regsvr32 vss_ps.dll
vssvc /register
regsvr32 /i swprv.dll
regsvr32 /i eventcls.dll
regsvr32 es.dll
regsvr32 stdprov.dll
regsvr32 vssui.dll
regsvr32 msxml.dll
regsvr32 msxml3.dll
regsvr32 msxml4.dll
663 views
Apr/100
How to reset the Primary Key Index Value on an SQL Table
I recently had to reset the Primary key (Integer, AutoIncrement) from a Table I removed all entries from.
You can use the DBCC CKECKIDENT Statement to achieve this.
Reset Primary Key Index on SQL Table
USE YourDatabase
DBCC CHECKIDENT('YourTable', RESEED, 0)
This would reset the next identity value to begin at 1.
If you are receiving the following error, you might have not switched to the correct Database before executing the Statement:
Msg 2501, Level 16, State 45, Line 1
Cannot find a table or object with the name "YourTable". Check the system catalog.
Make sure you are using the “USE YourDatabase” statement before executing the DBCC .
434 views

(3 votes, average: 4.67 out of 5)