Quote of the Day

Sunday, February 23, 2014

Adware, Malware, Viruses.... Oh My!

Haven't blogged in a while... Anyway, just thought I'd vent about all the "free" software out there that are getting sneakier about getting you to install adware/malware/virus which usually hijacks your browser/search engine and are almost impossible to simply uninstall to get rid of.
The latest for me was FoxIt Reader which tries to install Conduit Search "Protect" if you do the standard install (which is why I almost always choose custom/advanced install for everything).
This is the 2nd or 3rd PDF reader/printer that I've had that start out as great products, then, for whatever reason (desperation?) they start adding unwanted payloads to their installs/upgrades but most users will not be aware of until weeks or months later after their PCs have been completely rendered useless by these Trojan Horses.

Some others I've ran across (and actually got by my keen eye and installed):

  •  Babylon Search (got installed with a "free" SQL tool that was recommended by other SQL professionals at a conference I was at) 
  •  payload.sidekick.net - A re-direct "virus" which was added silently to the iHeartRadio Chrome Extension Both of these were a pain to remove/clean from my PC. 

Babylon kept re-installing every time I launched the SQL tool until I realized what program was actually doing this.
Almost makes me long for the days of MS-DOS and green screens... sigh.
Bleeping Computer is a great resource for finding out how to remove these nasty things but beware that many of the solutions are not for the faint of heart and require some patience and attention to detail and a lot of reading to see what works and what doesn't. Here is a place to start: http://www.bleepingcomputer.com/tutorials/how-to-remove-a-trojan-virus-worm-or-malware/

Feel free to share your "free" software horror stories in the comments section.

Saturday, January 30, 2010

Preparing for SQL 2008 and Beyond

Been doing some SQL maintenance to take care of some deprecated features in SQL. We want to change all text/ntext types to VARCHAR(MAX) or NVARCHAR(MAX). We also made heavy use of Default Object Bindings in the past and want to change these to Default Constraints. While I'm at it I'll also check for any columns without defaults.

Thought I'd share some useful SQL scripts in case you are embarking on the same adventure.

Find all text/ntext columns in a database:


SELECT
e.name as table_name, c.name as column_name, t.name as type_name
FROM
sys.columns c
JOIN
sys.tables e
ON
e.object_id = c.object_id
LEFT JOIN
sys.all_objects ex
ON
ex.object_id = c.default_object_id
JOIN
sys.types t
ON c.user_type_id = t.user_type_id
Where OBJECTPROPERTY(c.object_id, 'IsMsShipped')=0
and t.name in ('text','ntext')
order by 1, 2


This is useful for finding any column type in your database just by changing the criteria. Using this I quickly was able to create scripts to update our development, test and production databases.

Find columns with NO defaults defined:


SELECT
e.name as table_name, c.name as column_name
FROM
sys.columns c
JOIN
sys.tables e
ON
e.object_id = c.object_id
LEFT JOIN
sys.all_objects ex
ON
ex.object_id = c.default_object_id
Where OBJECTPROPERTY(c.object_id, 'IsMsShipped')=0
and ex.name is null
order by 1, 2


Now find all the bound Defaults:


SELECT
e.name as table_name, c.name as column_name,
ex.name as default_object
FROM
sys.columns c
JOIN
sys.tables e
ON
e.object_id = c.object_id
LEFT JOIN
sys.all_objects ex
ON
ex.object_id = c.default_object_id
Where OBJECTPROPERTY(c.object_id, 'IsMsShipped')=0
and ex.name in ('UW_NullDefault','UW_SpaceDefault','UW_ZeroDefault')
order by 1, 2


And this script will automatically replace the bound default with a default constraint:


BEGIN

DECLARE @FixList TABLE
(
Number INT NOT NULL PRIMARY KEY CLUSTERED,
TableName SYSNAME NOT NULL,
ColumnName SYSNAME NOT NULL,
DefaultObject SYSNAME NOT NULL
)

INSERT @FixList
(
Number,
TableName,
ColumnName,
DefaultObject
)
SELECT
Number = ROW_NUMBER() OVER (ORDER BY e.name, c.name),
e.name as table_name, c.name as column_name,
ex.name as default_object
FROM
sys.columns c
JOIN
sys.tables e
ON
e.object_id = c.object_id
LEFT JOIN
sys.all_objects ex
ON
ex.object_id = c.default_object_id
JOIN
sys.types t
ON c.user_type_id = t.user_type_id
Where OBJECTPROPERTY(c.object_id, 'IsMsShipped')=0
and ex.name in ('UW_NullDefault','UW_SpaceDefault','UW_ZeroDefault')
order by 1, 2

DECLARE @RowID INT, @SQL VARCHAR(1000)
SELECT @RowID = 1, @SQL = ''''
DECLARE @TableName SYSNAME
DECLARE @ColumnName SYSNAME
DECLARE @DefaultObject SYSNAME
DECLARE @I INT
SET @I = 1

SELECT @RowID = Number, @TableName = TableName, @ColumnName = ColumnName, @DefaultObject = DefaultObject FROM @FixList WHERE NUMBER = @I
WHILE @TableName IS NOT NULL
BEGIN
-- unbind default object
BEGIN TRY
SET @SQL = 'EXECUTE sp_unbindefault N''['+@TableName+'].['+@ColumnName+']'''

PRINT @SQL
EXEC(@SQL)

BEGIN
IF @DefaultObject = 'UW_SpaceDefault'
SET @SQL = 'ALTER TABLE ['+@TableName+'] ADD CONSTRAINT DF_'+@TableName+'_'+@ColumnName+' DEFAULT ('''') FOR ['+@ColumnName+'] '
ELSE IF @DefaultObject = 'UW_ZeroDefault'
SET @SQL = 'ALTER TABLE ['+@TableName+'] ADD CONSTRAINT DF_'+@TableName+'_'+@ColumnName+' DEFAULT (0) FOR ['+@ColumnName+'] '
ELSE
SET @SQL = 'ALTER TABLE ['+@TableName+'] ADD CONSTRAINT DF_'+@TableName+'_'+@ColumnName+' DEFAULT (NULL) FOR ['+@ColumnName+'] '
END

PRINT @SQL
EXEC(@SQL)
SET @I = @I + 1
SELECT @RowID = Number, @TableName = TableName, @ColumnName = ColumnName, @DefaultObject = DefaultObject FROM @FixList WHERE Number = @I
IF @@ROWCOUNT = 0 BREAK
END TRY
BEGIN CATCH
PRINT 'Failed on table: '+@TableName+' Column: '+@ColumnName
BREAK
END CATCH
END

END


Update 1/31/2010:

Just found this post which I borrowed some ideas from to get this working.

Thursday, August 09, 2007

De-Crappify part 2

As a follow-up to my last post, here are a couple utilities to aid in cleaning out the crap from XP:

My Dad told me about this one: Startup Inspector - user friendly alternative to msconfig. There is a "consult" button that goes out and pulls back info from a knowledgebase about known startup items, whether they are good, bad or ugly.

And a co-worker told me about this: Crap Cleaner - Cleans out the crap from your registry, temp files, cookies, etc. Knows about different browsers, etc.

So, with a little bit of regular housekeeping using these utilities as well as spyware scanning (ie. Adaware, etc.), virus protection and Windows updates you can keep your XP machine very happy and running lean and mean.

Friday, August 03, 2007

De-Crappify Your Windows XP PC

Video tutorial on turning off non-essential background programs, cleaning up spyware, cleaning your registry, etc. Most of this I knew already (I am usually pretty anal about what I install to begin with) but was a good refresher and is motivating me to doing this stuff again as my PC's seem to be getting a little doggy lately. Anyway, just ran across this and thought some of my non-Vista friends and colleagues might get some use from this. Enjoy!


Click here to view the screencast

Thursday, June 28, 2007

Xiine - All You Can Read



Just read about this on Claudio's blog and thought I'd check it out. I must say I am very impressed with this piece of software. I have been a long-time user of Zinio and subscribe to a couple of zines on that platform. Although I have not done a thorough side by side comparison I will say that Xiine definitely has some features that I like. The zooming is better. You can rotate the zine in case your on a portrait monitor or tablet PC. Many options for layout if you don't like split pages you can read in a scrollable fashion, etc. I was able to pull in several back issues of CoDe from my subscription. Although, it only goes from Sept 2003 up to July/August 2004 for some reason... (I better check my current subscription status although I'm sure if it lapsed it was recent...)
Anyway, kudos to the EPS team for creating this slick application using some of the latest technology. Make sure to check it out and read more on Markus' blog.

Monday, May 21, 2007

Business Decision Regarding VFP?

Mike Feltman just posted on his blog a counter-point to Microsoft's announcement. He brings up some very interesting points as to whether this was truly a "business" decision based on facts. I have been ranting for years (ask the people I work with) about the lack of respect VFP got from within Microsoft and the development community as a whole. I mean seriously, VB (pre .NET) was their idea of a data-centric programming language? And what about the horrible IDE called Visual Studio that it was packaged in. Ugh! If you ask me, they should have re-branded Visual Studio along with VB and those tools would probably be doing much better in the market place.
Andy hit the nail on the head when he talked about "the perception of the uninformed, marketing and buzz-word driven, benighted people who wouldn't dream of considering or using VFP anyway". Microsoft helped to feed that perception, in my opinion, or at least did NOTHING to refute it. Perhaps an internal memo educating their own people in the development tools division might have done something.
So yes, business decision it was, but I agree with Mike that this business decision was made long ago.

So, no more Visual FoxPro. Now what?

Great blog post by Andy Kramek on Microsoft's recent announcement concerning VFP. Andy's thoughtful insight is always refreshing.