Oct 2

If you have ever wanted to post some source code or a code snippet in WordPress this is a sure read. Earlier today I posted an article that I wanted to post some SQL statements in. These statements were pretty complex with lots of single and double quotes. WordPress did an excellent job of screwing these up for me. The code snippet would not work when my readers copied it and tried it themselves. Luckily I caught this before 1000′s of my (non existent) readers could have seen it.

If WordPress has caused you some grief with formatting your code, I’m sure you have searched high and low on the internet for a plugin or even a new editor that would not mess up your text formatting. I searched the web for a few minutes myself and didn’t really find what I wanted. I did come across quite a few sites that mentioned putting your quotes and double quotes as well as other characters in ASCII codes format. This seemed to be difficult for me to read through many lines of code and replace each little character that was going to possibly cause me a problem.

Replacing key characters with ASCII code keeps WordPress for formatting the text. On the output side the text is displayed correctly and is not displayed in ASCII code. The only problem I found with this solution was I had to manually figure out what to replace as well as look up the ASCII code and then type it in. My solution? A text to ASCII converter. Within seconds I found a website that would take my source code text and output ASCII codes. I simply take my entire section of source code, not just the characters that cause me problems, and I convert it to ASCII codes. I paste this into my post as if it were my code snippet (it technically is, just in ASCII code format). I then use code brackets around it in my WordPress WYSIWYG editor and everything looks great.

Here is the website I used: Text to ASCII Converter Site

Hope this helps you as it has helped me.


Oct 2

I have been fighting with Symantec Altiris Software Delivery Solution licenses for some time now. I have had numerous support calls trying to get Altiris to assist me in tracking down where each of these licenses has went. Today I found what I was looking for after Symantec Altiris support was unable to help me. I was actually told that they would not help me find a list of machines that were taking up licenses. I was pretty unhappy about this and will reconsider my options going forward. I did submit a feature request to them. I just want to be able to prove that each license is being used up by a machine that I approve. In SWD 7.0 they are changing the license model to be based on agent installation. The current version I am using is 6.0 SP3.

Here is a SQL statement I captured using sql profiler that they execute to generate the number of in use Software Delivery Licenses.

exec sp_executesql N'SELECT COUNT(DISTINCT Stat.WrkstaId) FROM AeXEvt_AeX_SWD_Status as Stat, SWDAdvertisement as Advert, SWDOriginator as Orig, SWDProgram as Prog, vItem vI, Wrksta Wr WHERE Stat.AdvertisementId = Advert.AdvertisementId AND Stat.AdvertisementId = vI.Guid AND ( vI.ClassGuid = ''5B91F0BF-899F-49E2-B8E1-67219100BBFA'' OR vI.ClassGuid=''2D39BA40-2A60-42EE-92E0-C11AD2245969'') AND vI.ProductGuid = ''AD3F5980-D9E9-11D3-A318-0008C7A09198'' AND LOWER(Prog.ProgramId) = LOWER(Advert.ProgramId) AND LOWER(Prog.CommandLine) NOT Like ''aexinvsoln.exe%'' AND Orig.OriginatorId = Advert.[_OriginatorId] AND Advert.[_Latest] =1 AND Orig.Type != ''NSInternal'' AND ( Stat.EventType=''New Job'' OR Stat.EventType=''Package To Be Removed'' OR Stat.EventType=''Job Removed'' OR Stat.EventType = ''Job Updated'') AND Stat.WrkstaId = Wr.WrkstaId AND (Wr.SystemType = ''Win32'' OR Wr.SystemType = ''Win64'')',N'@ProductGuid uniqueidentifier',@ProductGuid='AD3F5980-D9E9-11D3-A318-0008C7A09198'

It is counting unique workstation id’s. I change this to look at workstation names and disable the counting. Please keep in mind that this may actually cause you to generate a different number of machines as two machines may have ended up with the same name. For what I was doing this was ok.

Here is the sql statement for a list of machines.

exec sp_executesql N'SELECT Distinct Wr.Name FROM AeXEvt_AeX_SWD_Status as Stat, SWDAdvertisement as Advert, SWDOriginator as Orig, SWDProgram as Prog, vItem vI, Wrksta Wr WHERE Stat.AdvertisementId = Advert.AdvertisementId AND Stat.AdvertisementId = vI.Guid AND ( vI.ClassGuid = ''5B91F0BF-899F-49E2-B8E1-67219100BBFA'' OR vI.ClassGuid=''2D39BA40-2A60-42EE-92E0-C11AD2245969'') AND vI.ProductGuid = ''AD3F5980-D9E9-11D3-A318-0008C7A09198'' AND LOWER(Prog.ProgramId) = LOWER(Advert.ProgramId) AND LOWER(Prog.CommandLine) NOT Like ''aexinvsoln.exe%'' AND Orig.OriginatorId = Advert.[_OriginatorId] AND Advert.[_Latest] =1 AND Orig.Type != ''NSInternal'' AND ( Stat.EventType=''New Job'' OR Stat.EventType=''Package To Be Removed'' OR Stat.EventType=''Job Removed'' OR Stat.EventType = ''Job Updated'') AND Stat.WrkstaId = Wr.WrkstaId AND (Wr.SystemType = ''Win32'' OR Wr.SystemType = ''Win64'')',N'@ProductGuid uniqueidentifier',@ProductGuid='AD3F5980-D9E9-11D3-A318-0008C7A09198'

Finnaly if you would like to list out all of the fields that are pulled use the following statement.

exec sp_executesql N'SELECT * FROM AeXEvt_AeX_SWD_Status as Stat, SWDAdvertisement as Advert, SWDOriginator as Orig, SWDProgram as Prog, vItem vI, Wrksta Wr WHERE Stat.AdvertisementId = Advert.AdvertisementId AND Stat.AdvertisementId = vI.Guid AND ( vI.ClassGuid = ''5B91F0BF-899F-49E2-B8E1-67219100BBFA'' OR vI.ClassGuid=''2D39BA40-2A60-42EE-92E0-C11AD2245969'') AND vI.ProductGuid = ''AD3F5980-D9E9-11D3-A318-0008C7A09198'' AND LOWER(Prog.ProgramId) = LOWER(Advert.ProgramId) AND LOWER(Prog.CommandLine) NOT Like ''aexinvsoln.exe%'' AND Orig.OriginatorId = Advert.[_OriginatorId] AND Advert.[_Latest] =1 AND Orig.Type != ''NSInternal'' AND ( Stat.EventType=''New Job'' OR Stat.EventType=''Package To Be Removed'' OR Stat.EventType=''Job Removed'' OR Stat.EventType = ''Job Updated'') AND Stat.WrkstaId = Wr.WrkstaId AND (Wr.SystemType = ''Win32'' OR Wr.SystemType = ''Win64'')',N'@ProductGuid uniqueidentifier',@ProductGuid='AD3F5980-D9E9-11D3-A318-0008C7A09198'

Now I’m off to clean up my Altiris SWD.


Sep 16
VMWorld 2008
icon1 Trace | icon2 Conferences | icon4 09 16th, 2008| icon3No Comments »

VMWorld 2008 in fabulous Las Vegas!

It took a bit of work to get here as my home city was hit by Hurricane Ike the weekend I was scheduled to fly out to VMWorld 2008 in Vegas.

Lots of contests going on. I have one from cibra where I need to match a card with someone else. If I can find the matching person we win $300. Here is a picture of my card..

All paid attendee’s will have access to the pdf’s for the sessions as well as flash videos. The videos are going to be audio over slides. These will be available by October 2008.

A new site has been launched by vmware. http://viops.vmware.com. This site is going to save us! It is a collection of best operational practices. It is in a discussion forum format.

I’ll keep updating this post with useful information as I find it.

Virtually anything is possible.


« Previous Entries