Because I’m super fun now, things like this seem important to me. Want to detect an application installed per user rather than per machine in SCCM 2012? Annoyed that Chrome and Dropbox are tricksy little bastards that hide away in c:\users\%username%\appdata\some godawful location? Well be annoyed no more because you can create a device collection with a query like this to detect them.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FilePath like "c:\\users\\%roaming%" AND SMS_G_System_SoftwareFile.FileName like "%dropbox%.exe%"
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FilePath like "c:\\users\\%appdata%" AND SMS_G_System_SoftwareFile.FileName like "%chrome%.exe%"
Edit the bits in red to be whatever combination of file path and filename you’re after and boom, a collection of machines that fit the criteria. I’ve been deliberately vague here with all the %s but you could be as specific and refined as you like. I’m sure there’re better ways of getting this done, too, but this worked for me.
Regrettably, I seem to be becoming a serious-ish adult.
At least, I think that’s what it is.
Because the alternative is too unappealing to consider.
All I know is that I’ve started thinking about things before I do them.
And considering consequences.
And – ugh – planning for the future.
Does that sound adult-y?
It feels adult-y.
And I know it sure as hell is killing off some of the things I used to enjoy.
Not because I don’t enjoy them any more.
But because the time keeps being spent doing sensible stuff.
Or looking at houses.
Instead of drinking.
And cycling down mountains.
I mean, that still happens.
But sometimes it doesn’t because I’m at work.
I don’t even.
And I use a calendar now.
Not to mention a diary.
Because I have things I need to keep organised.
I never used to have things I needed to keep organised.
Or things, I suppose.
That’s what cycling up this bloody Welsh pass gave me.
I’d like to blame the weather for the lack of cycling I’ve done this year.
Hence the lack of physical fitness.
But I think it’s more likely down to the fact that I’m a fat lad.
And some things never change.
Back before work began taking over my life, I used to have lots of free time to spend bimbling about taking photographs, being odd and getting chased away from intriguing derelict buildings by security guards.
Well, I think I’m finally getting back to a point where I can do that again.
More or less.
I mean, it’s not perfect.
I get email alerts and shit all the time.
Which I can ignore, I guess.
It’s just often better to fix stuff before people notice and start complaining.
Because man am I intolerant.
Especially when everything’s going wrong.
It’s about the third worst time to speak to me.
Not that there’s an especially good time, I admit.
But it’s one of the worst.
Act 3, Scene 2
The coast of Wales. A castle in view.
KING RICHARD II
No matter where; of comfort no man speak:
Let’s talk of graves, of worms, and epitaphs;
Make dust our paper and with rainy eyes
Write sorrow on the bosom of the earth,
Let’s choose executors and talk of wills:
And yet not so, for what can we bequeath
Save our deposed bodies to the ground?
Our lands, our lives and all are Bolingbroke’s,
And nothing can we call our own but death
And that small model of the barren earth
Which serves as paste and cover to our bones.
For God’s sake, let us sit upon the ground
And tell sad stories of the death of kings;
How some have been deposed; some slain in war,
Some haunted by the ghosts they have deposed;
Some poison’d by their wives: some sleeping kill’d;
All murder’d: for within the hollow crown
That rounds the mortal temples of a king
Keeps Death his court and there the antic sits,
Scoffing his state and grinning at his pomp,
Allowing him a breath, a little scene,
To monarchize, be fear’d and kill with looks,
Infusing him with self and vain conceit,
As if this flesh which walls about our life,
Were brass impregnable, and humour’d thus
Comes at the last and with a little pin
Bores through his castle wall, and farewell king!
Cover your heads and mock not flesh and blood
With solemn reverence: throw away respect,
Tradition, form and ceremonious duty,
For you have but mistook me all this while:
I live with bread like you, feel want,
Taste grief, need friends: subjected thus,
How can you say to me, I am a king?
For some reason, this scene came up in conversation while down the pub and I remembered that I really rather enjoy it. I thought I’d share.