Friday, May 28, 2010

Batch files aplenty

I wrote a tiny batch file a while ago that creates a folder string with the date and time then makes a folder with that string and copies files daily to an external drive for backup purposes. Its grown into a windows event creator and a text file creation with the date and time of start and finish. I thought I would paste them here for anyone to use.

Start of batch file (comment lines are REMmed out to help with creation:

@echo off

REM ****** Run VBS File to create Event log for start of file copy in Information Log ******
cscript "c:\users\reesed\documents\files\evntstrt.vbs"

REM ****** Set FOlder String to current date and time ******
set folder=%date:~10,4%%date:~4,2%%date:~7,2%

REM ****** Make Directory on resource calling folder string ******
mkdir e:\HDDaily\%folder%

REM ****** Create text file in folder string stating copy start ******
echo Start date and time: %date% - %time% >> e:\hddaily\%folder%\cpresult.txt

REM ****** Copy files to resource ******
xcopy \\SERVER LOCATION\*.* e:\HDDaily\%folder% /c /h /e /v /y

REM ****** Append end time and date to text file created in folder string ******
echo End date and time: %date% - %time% >> e:\hddaily\%folder%\cpresult.txt

REM ****** Run VBS file to create event log for end of file copy in Information log ******
cscript "c:\users\reesed\documents\files\evntend.vbs"


Start of VBS FILE (file that creates the event log):

' Constants for type of event log entry
const EVENTLOG_SUCCESS = 0
const EVENTLOG_ERROR = 1
const EVENTLOG_WARNING = 2
const EVENTLOG_INFORMATION = 4
const EVENTLOG_AUDIT_SUCCESS = 8
const EVENTLOG_AUDIT_FAILURE = 16

strMessage = "HomeDirs Batch FIle Copy Started"

set objShell = CreateObject("WScript.Shell")
objShell.LogEvent EVENTLOG_INFORMATION, strMessage


Just change the strMessage to whatever you want and then copy the file to make another one that "ends" the event. Thanks to Pat for the "double greater thans" that append text to a file and to Jake for the sexy VB script.

Wednesday, May 26, 2010

Facebook Privacy crap

Im having a hard time understanding what ppl are all up in arms about over the new Facebook crap. Its not like they are rooting through your trash and sharing things about your bra size or condom size. They are sharing WHAT YOU TELL THEM. Cripes. If you dont want your SS# to be shared among advertisers, then DONT PUT IT ON FACEBOOK. If you dont want those drunk pics of you flashing everyone during a sweet tailgate party, dont upload the pics to facebook.

Facebook only shares what they have to share which means you have to give them the info to share. The word privacy only encompasses the information that you upload to Facebook, nothing more.

Tuesday, May 25, 2010

hsbs

Looks like that service stoppage works for now. Havent seen an increase in memory usage since I killed those two services. I did not, tho, try to access the control panel or anything. I was able to copy files to and from it and play a movie from it so i dont think those services have anything to do with the drive management.

Ill post more later.

Thursday, May 20, 2010

Droid Incredible Alarm Not Working

Recently i had an issue with my Droid Incredible and the alarm not going off in the morning. Kinda important.

Yeah, after a bunch of searching, I came to find out that if you have a Task Killer app and you kill all the tasks on a regular basis, it kills certain processes that make the alarm do what its supposed to.

After uninstalling the Advanced Task Killer, everything is right in the world again.

HSBSServiceHost.exe

I just found that on a 2008 WHS server, this service eats up all available memory and then the machine crawls. I havent been able to find anything on it so I decided to resurrect my old blog site and post this stupid stuff.

Apparently ending the task just makes new ones start up and in a few days, its back to full memory usage. It might be a bug since this software is still in beta (VAIL), but i tried something last night that I hope will fix it. Lots of services that start up use this EXE file for calling other programs. This one in particular is the Windows Host Service Provider A and Provider B. Youll find these services in the service list. You can stop them and it appears that the HSBS processes that use up all the memory go away.

I do not know the long term effects of stopping these services but it has to be better than your drives failing because they are constantly doing something.

I plan on buying this software when it comes out. Its pretty slick. Leaps and bounds over WHS v1 (built on server 2003 tech).