Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

16.12.10

Rotating event Log files in Windows Server 2003. Shouldn't this be done automatically?

First off let me say yes, we still use Windows Server 2003 SP2 here. It serves the purpose we need it for and as of right now those needs may be small but are still very relevant. I would love to wipe the server and install RHEL6 but that's further down the line.

Alright, back to the task at hand. When I first started working here, about a year ago, the server performance was abysmal at best. That led me to start looking at what was dragging the server down, besides being a Windows box that is. One of many, many, findings was the Event log files were not set to be rotated out, ever! With my background in Linux administration I was completely baffled as to why this would not be a standard on any server.. Bueller?

So, I went about looking into this and found many solutions. There were two options that stuck out as viable alternatives one was an .adm template and the other was simple bash script... I mean batch script (:

I wanted a quick solution that I could possibly modify for other uses on the fly with minimal fuss, that obviously left out an adm template. So, off to work on a batch script I went. After shaking off the rust of batch scripting, it was an easy solution.

I utilized Sysinternals Psloglist.exe in the below example. A later addition also adds 7zip by Igor Pavlov into the mix so the weeks log files can be zipped and stored for later viewing if necessary.

Below is the code that I used to accomplish this task, please feel free to adjust this code to fit your systems if you are in a similar situation.

REM This is to rotate the logs:
REM Created by Dan M.
REM This work is released un the Creative Commons Non-commercial Share A-like license
REM http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode

:: Get date in useful format
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set newdate=%%c-%%a-%%b)

:: Echo
ECHO "This is a log of the purge/rotation of the event logs" > f:\logs\file.txt
ECHO "-----------------------------------------------------" >> f:\logs\file.txt

:: Run Sysinternals PslogList.exe
:: Echo out times to file.txt for emailing
%SYSTEMDRIVE%\SysinternalsSuite\psloglist.exe Applications -c -g f:\Logs\%newdate%_APP_EVTS.evt
ECHO "Application events were rotated %newdate% at %time%" >> f:\logs\file.txt
%SYSTEMDRIVE%\SysinternalsSuite\psloglist.exe Security -c -g f:\Logs\%newdate%_SEC_EVTS.evt
ECHO "Security events were rotated %newdate% at %time%" >> f:\logs\file.txt
%SYSTEMDRIVE%\SysinternalsSuite\psloglist.exe System -c -g f:\Logs\%newdate%_SYS_EVTS.evt
ECHO "System events were rotated %newdate% at %time%" >> f:\logs\file.txt

:: Call email_me.cmd
CALL g:\scripts\Email_me.cmd

Remember adjust your variables and destinations accordingly and as always happy admin-ing!

3.7.09

Another run-in with Windows Vista

Where to begin? Well, I am moving back to New York after nine years of living no closer then 9.5 hours by car. With this move comes the oh so fun job hunting. As many of you know, unless you live under a rock, the job market flat out stinks at this point in time. I have applied for 27 jobs and have heard back from one! Anyhow, this whole resume thing and it having to be in the lovely proprietary Microsoft Word format 97% of the time, has gotten a little unruly in OpenOffice. Don't get me wrong OpenOffice is great, when it is not deleting embedded tables in doc files as it is in 3.1, I use it every day for normal document, PDF, spreadsheet application. But, the table dropping was killing me, so I said screw it and installed my copy of Windows Vista Business x32 that came with my Thinkpad.

First off the install was quick, on the 20GB partition I allowed it, but the updates took over 2 hours to download and install! Mind you I do have a 6MB pipe and they were downloaded in less than 10 minutes. Installing should not have taken over an hour and a half on a dual core T7100 1.8Ghz intel with 4GB of ram. After my wait was over sometime around midnight I installed the much needed Antivirus and went to bed, finally.

This morning I installed my Copy of Office 2007, applied service pack one and was on my way to my normal tasks. Checking email, looking at job boards, etc. I soon realized my four legged friend needed to take a little trip outside. So, I closed the lid on my Thinkpad, like I did last night, and took him for a walk. Needless to say I was distracted for a good 3 hours, I happened to be walking into the kitchen when I noticed my amber battery light was on and the little green moon was not! I panicked a little because I have my good battery(7 cell) in and not the little 4 cell that came with it, these are not cheap and I try not to run them below 25% unless it is an absolute necessity.

So now that you are up to date on the on the happenings, I suppose I can show you the picture of what the desktop looked like when I opened the lid.



Lovely heh? Less than 14 hours installed and I get my first BSOD. Someone again tell me why I don't use Microsoft products? As of right now I am only at 31% of my battery, thank you Windows Vista Experience you have made my day and busy weekend for that matter, even better.

I am off to install Ubuntu Linux on the other 60GBs of my hard drive, guess I should have just dealt with VirtualBox OSE's lack of USB support in the free version, thanks a lot Sun! I blame you too.

And by the way I did click the "Find a Solution" button, you know what I got? Nothing....

Thanks again....

19.5.09

Oh no windows Viruses on my Linux box!!

This was supremely entertaining.

My Linux box was infected with Windows viruses oh no! As you can see I downloaded the install.exe to help me keep my system clean!. ;)



The not so funny part is that the that the detection @ VirusTotal was 11/40 or 27.5% <--- yuck!

13.2.09

Best quote of the week

"The one ray of hope is that maybe, just maybe, the thousands of Windows worms will go to war with each other and kill every Windows machine on earth. Though that would be a short-lived cure, because even after a Windows holocaust the first thing the survivors are going to do is get up, dust themselves off, and see if rebooting will bring their systems back up." -- Carla Schroder

15.11.08

Acer Aspire One - Windows version, OOPS!

Behold the poster child for Linux on Netbooks.



This was shot at my local Staples on 15 November, 2008.

Here is a close up of the screen. I love the part about the CD-ROM.



*Sorry about the quality, it is a camera phone what can I say.
**And this display model is not for sale apparently

8.11.08

Custom DrWeb CureIt utility -

As some may know I have switched to Linux for my everyday computing needs. This has left my "Storage" partition mostly untouched for months. Today I re-applied my 'Windows V!sta Business' Image to the Windows partition in order play around over the weekend.

While examining the Storage partition, mainly getting the needed security apps loaded on V!sta, I found a little script I wrote to deal with the DrWeb CureIt update issue(s).
Some may be curious as to what these "issues" are (IMO):
#1 You have to download the entire CureIt utility to have the most current virus definitions every time
#2 The ads that are packed with the program to buy Dr. Web are a bit over the top and annoy me
I understand this is a free tool and they need to make money, but I do believe they can do without my $20 for a spell.

Moving on, this is a simple batch file that can automate the process required to manually update the modified CureIt utility. In reality this is not "CureIt" but a modified version of the normally installable version which goes easily on a USB drive. I got the idea two years ago when CureIt first came out, the way it was packaged made me realize that DrWeb's main scanner didn't have to be installed to sniff out and destroy malware and off I went.

How this script works is simple, there is a zip file that has the needed files in it, simply extract and navigate to the DrWeb_USB folder and run Launch.bat. I have removed all the bases to save space in the download, so you will need to select option #1 the first time.

You may be able to swap out the Drweb32.exe for a newer version but this is not tested and is not supported(Much like the rest of this program). Do not try to use the .exe from the actual newer CureIt versions as Dr.Web has "fixed" it. If you would like to try a newer scanner version, use a installed version and the same goes for a newer .dll.
I do believed I tried this with more recent releases but it failed I think....

DISCLAIMER
If this somehow breaks your computer, which is highly unlikely, it is not my fault.

ALSO
If you feel like you are cheating the good Doctor please by all means buy a license and substitute that for the cureit.key. The only reason this is included is so that everyone can use it.

Below are two screen shots

CMD Windows options:


Driver Versions(note vdb's not included):


Here is the link to the zip file:
http://www.zer0-tec.net/files/DrWeb_USB.zip

//If this is illegal it will be promptly removed with word from DrWeb ltd.//

Dan

8.10.08

Thanks again Microsoft!

As some of you know, well if you read this blog that is, over the last year or so I have switched 98% of my computing to Linux. There does however seem to be something around every two weeks that requires me to use Windows and today was one of those days.

Below you will find what I was greeted with this morning. All I have to say is "Thanks again Microsoft" this time you have proven it is not only third party vendors who like to crash and lockup the computer. FANTASTIC!!















And just in case you are wondering what I was doing to have this happen the answer is nothing, it looks like AU went off and BLAM! There goes the OS.
Userspace "What is that!"
UGH!

2.7.08

Pidgin 2.4.3 released - Fixes ICQ issue

Great job to the Pidgin maintainers for a quick response to the ICQ issues reported yesterday.

Downloads for version 2.4.3 are available @ http://www.Pidgin.im

1.7.08

ICQ users left in the dark

As is being reported around the net 3rd party ICQ clients Pidgin and Kopete are are stuck ICQ-less until patches get merged into the systems. Pidgin is affected in the Linux and Windows world, fixes are available but to my knowledge these are only temporary or proposed and not anything official.

Ubuntu temp fixes: https://bugs.launchpad.net/ubuntu/+source/pidgin/+bug/244591
Windows temp fixes: http://developer.pidgin.im/attachment/ticket/6220/liboscar.zip

You have to love unannounced protocol changes! :)

23.2.08

Trying Vista SP1

Well with all the talk of Windows Vista and its failure to claim the "fame" on the desktop, I thought it fitting to give it another chance on my "new" ThinkPad R61.

As I have been a Microsoft Beta Guinea pig for a few years I have had access to the Service Pack for about a week now. Until today I had no desire to run it at all, to be honest I was just bored. So here goes;

Installation was very fast, I was done in roughly 30 minutes. Base install no special software from Lenovo mind you. Most everything worked right from the start.
I think Microsoft figured out what I have thought was the biggest obstacle of an install for years, having an active internet connection first, being if I have a wireless card I more than likely will not plug in during my install why should I? This really irritates me in Linux BTW.

Things I have noticed that don't work, IBM Powermanager, On Screen Display, and the battery life is dismal at best.....

Maybe more if I keep it installed, this is doubtful though.

21.9.07

[How To] Install Zune theme on XP Pro x64 -

I know the Zune theme has been around for a while and may be old news to most of you but there is a simple solution to the error that is output when a user tries to install the ZuneDesktopTheme.msi from Microsoft on a x64 version of Windows.

1. Search Google for a file called orca.msi, this is a MSI "manipulation" tool from MS.
1a. Or you can download it from here
2. Install orca, the defaults are fine
3. Download the Zune desktop theme, the direct link from MS is above ^
4. Right click on the ZuneDesktopTheme.msi and select edit with Orca
5. Under the Tables section(left) go to InstallExecuteSequence
6. In the Action-Condition-Sequence section(right) highlight LaunchConditions and Del
6A. Or right click the LaunchCondtions entry in the database and select Drop row
7. Answer yes to the prompt and then save and exit
8. Install the MSI as normal

Enjoy!!

15.9.07

17.8.07

Belkin F5D7000 v3 fix

If you happen to have a Belkin F5D7000 v3 like I do you can more then likely relate to the dropping of wireless connectivity all the time in Windows XP. Read on...

I found a fix while looking for Linux drivers for this card. As this card uses a RaLink chipset you can go to http://www.ralinktech.com/ under the support section and download the latest drivers and RaLink wireless utility directly from their website here .

Updating your drivers will alleviate the dropped connections, I had to do the driver update manually as Windows told me it couldn't find a better driver than it already had. But now I haven't had a dropped connection in days!

HTH someone else!

30.7.07

Talk about cryptic errors...


I get this little guy everytime I try to empty my Recycle Bin in XP.
You have to love the descriptive information provided.
NO I am not trying to delete the desktop before anyone chimes in with that...