Archive

Posts Tagged ‘delete’

Quickie: How to delete registry using reg file

June 6th, 2014 No comments

I always used .reg files to import registry keys and values. I started to think if it’s possible to delete registry key or value using .reg file.

To create key and value you can use following .reg file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\test]
“test_value”=dword:00000010

 

To delete only value “test_value” you can run following .reg file (minus sign after the equal sign):

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\test]
“test_value”=

 

To delete whole key you can run following .reg file (minus sign in front of key name):

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\test]

 

That’s all for now,

 

Quickie: Delete all Offline files on Windows XP

November 19th, 2013 No comments

Couple days ago I migrated fileserver. We moved redirected My Documents for users on another server. We also hided these shares behind DFS namespace to make it more manageable in future. But we found out problem with this setup –  offline files. Windows XP kept offline copies of old and new redirected files. We had to clean this offline data database. I setup start up script:

@ECHO OFF
IF EXIST C:\OfflineFilesClean.txt (
  REM Do one thing
) ELSE (
  reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache” /v FormatDatabase /t REG_DWORD /d 1 /f
  echo Vymazane > C:\OfflineFilesClean.txt
)

This script was dedicated just for Windows XP, so I had to apply GPO using WMI filter:

SELECT * FROM Win32_OperatingSystem WHERE Version LIKE “5.1%” and ProductType = “1”

This script would work also on Windows 7 and Windows 8, but those OS didn’t have problem.

That’s all for today,

TrendMicro Worry-Free Business Security debug logs

February 22nd, 2013 2 comments

Problem

Today I was at one customer which recently installed TrendMicro Worry-Free Business Security solution. It’s firewall and anti-* product. Today I noticed there is no free space on C:\ disk. Trend Micro ate 19 GB! The biggest portion of space was located at C:\Program Files\Trend Micro\Security Server\PCCSRV\Log. There were files called ofcdebug-*.log which were about 150 MB of size and there was lots of them. And there new comming and comming 🙂

Solution

Those file are debugging log files. There is really weird way to disable them. In management website you need to click on little small letter “M” in the logo:

TrendMicro Worry-Free

New window appears where you can enable/disable debug logs:

TrendMicro Debuging Log

This is really weird way to set logging by looking for some small letter “M” 🙂

More about it on official site.