SMS 2003 Need help building a collection
I have an issue where some of my client PCs have several different versions of Adobe Reader installed at the same time. I have a script I can deploy to a client to remove specific versions of Adobe Reader from the client, which I would like to deploy to any system that has Adobe Reader 8.1.1 AND any earlier version of Adobe Reader.
I tried the following query to get started, because I know I have at least 1 system that this applies to, based off of it's latest hardware inventory through Resource Explorer, but I get zero results in the collection. Any information as to what I'm doing wrong would be greately appeciated.
I tried the following query to get started, because I know I have at least 1 system that this applies to, based off of it's latest hardware inventory through Resource Explorer, but I get zero results in the collection. Any information as to what I'm doing wrong would be greately appeciated.
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_ADD_REMOVE_PROGRAMS on
SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Adobe Reader 7.0.5" AND
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Adobe Reader 8.1.1" order by
SMS_R_System.Name
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
yarborg
16 years ago
Posted by:
brenthunter2005
16 years ago
I believe you need to create a "subselect" query. The following SQL code queries for all computers that have "Adobe Reader 7.0.5" installed, and then only includes the computers that also have "Adobe Reader 8.1.1" also installed:
So, translating this into a SMS Collection query, you would get the following:
Test that and let me know how you get on.
Select v_r_system.resourceid
from v_R_System left join v_GS_ADD_REMOVE_PROGRAMS ARP on ARP.ResourceID = v_R_System.ResourceId
where ARP.DisplayName0 = 'Adobe Reader 7.0.5' and v_r_system.resourceid in
(select v_r_system.resourceid from v_R_System left join v_GS_ADD_REMOVE_PROGRAMS ARP on ARP.ResourceID = v_R_System.ResourceId where ARP.DisplayName0 = 'Adobe Reader 8.1.1')
So, translating this into a SMS Collection query, you would get the following:
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 left join SMS_G_System_ADD_REMOVE_PROGRAMS ARP on ARP.ResourceID = SMS_R_System.ResourceId
where ARP.DisplayName = "Adobe Reader 7.0.5" and SMS_r_system.resourceid in
(select SMS_r_system.resourceid from SMS_R_System left join SMS_G_System_ADD_REMOVE_PROGRAMS ARP on ARP.ResourceID = SMS_R_System.ResourceId where ARP.DisplayName = "Adobe Reader 8.1.1")
Test that and let me know how you get on.
Posted by:
pletcgm
16 years ago
Why don't you just put the removal codes in the IPF file? That's how I upgrades the various versions of readers to 8.1.1. I had SMS run the uninstall first and then it ran the install.
Here is my IPF of the uninstall
item: Check Disk Space
end
item: Get Registry Key Value
Variable=VER7INST
Key=SOFTWARE\Adobe\Acrobat Reader\7.0\Installer
Default=0
Value Name=ENU_GUID
Flags=00000100
end
item: Get Registry Key Value
Variable=VER8INST
Key=SOFTWARE\Adobe\Acrobat Reader\8.0\Installer
Default=0
Value Name=ENU_GUID
Flags=00000100
end
item: If/While Statement
Variable=VER8INST
Value={AC76BA86-7AD7-1033-7B44-A81100000003}
Flags=00000001
end
item: If/While Statement
Variable=VER8INST
Value=0
end
item: If/While Statement
Variable=VER7INST
Value={AC76BA86-7AD7-1033-7B44-A70000000000}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A70000000000} /qb- REBOOT=Force
Flags=00000010
end
item: Else Statement
end
item: If/While Statement
Variable=VER7INST
Value={AC76BA86-7AD7-1033-7B44-A70700000002}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A70700000002} /qb- REBOOT=Force
Flags=00000010
end
item: Else Statement
end
item: If/While Statement
Variable=VER7INST
Value={AC76BA86-7AD7-1033-7B44-A70800000002}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A70800000002} /qb- REBOOT=Force
Flags=00000010
end
item: End Block
end
item: End Block
end
item: End Block
end
item: Else Statement
end
item: If/While Statement
Variable=VER8INST
Value={AC76BA86-7AD7-1033-7B44-A80000000002}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A80000000002} /qb- REBOOT=Force
Flags=00000010
end
item: Else Statement
end
item: If/While Statement
Variable=VER8INST
Value={AC76BA86-7AD7-1033-7B44-A81000000003}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A81000000003} /qb- REBOOT=Force
Flags=00000010
end
item: End Block
end
item: End Block
end
item: End Block
end
item: End Block
end
Here is my install IPF File:
item: Check Disk Space
end
item: Get Registry Key Value
Variable=VER8INST
Key=SOFTWARE\Adobe\Acrobat Reader\8.0\Installer
Default=0
Value Name=ENU_GUID
Flags=00000100
end
item: If/While Statement
Variable=VER8INST
Value={AC76BA86-7AD7-1033-7B44-A81100000003}
Flags=00000001
end
item: Execute Program
Pathname=msiexec.exe Command Line=/I AcroRead.msi TRANSFORMS=AcroRead.mst /qb-
Flags=00001010
end
item: End Block
end
Here is my IPF of the uninstall
item: Check Disk Space
end
item: Get Registry Key Value
Variable=VER7INST
Key=SOFTWARE\Adobe\Acrobat Reader\7.0\Installer
Default=0
Value Name=ENU_GUID
Flags=00000100
end
item: Get Registry Key Value
Variable=VER8INST
Key=SOFTWARE\Adobe\Acrobat Reader\8.0\Installer
Default=0
Value Name=ENU_GUID
Flags=00000100
end
item: If/While Statement
Variable=VER8INST
Value={AC76BA86-7AD7-1033-7B44-A81100000003}
Flags=00000001
end
item: If/While Statement
Variable=VER8INST
Value=0
end
item: If/While Statement
Variable=VER7INST
Value={AC76BA86-7AD7-1033-7B44-A70000000000}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A70000000000} /qb- REBOOT=Force
Flags=00000010
end
item: Else Statement
end
item: If/While Statement
Variable=VER7INST
Value={AC76BA86-7AD7-1033-7B44-A70700000002}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A70700000002} /qb- REBOOT=Force
Flags=00000010
end
item: Else Statement
end
item: If/While Statement
Variable=VER7INST
Value={AC76BA86-7AD7-1033-7B44-A70800000002}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A70800000002} /qb- REBOOT=Force
Flags=00000010
end
item: End Block
end
item: End Block
end
item: End Block
end
item: Else Statement
end
item: If/While Statement
Variable=VER8INST
Value={AC76BA86-7AD7-1033-7B44-A80000000002}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A80000000002} /qb- REBOOT=Force
Flags=00000010
end
item: Else Statement
end
item: If/While Statement
Variable=VER8INST
Value={AC76BA86-7AD7-1033-7B44-A81000000003}
end
item: Execute Program
Pathname=msiexec.exe
Command Line=/x {AC76BA86-7AD7-1033-7B44-A81000000003} /qb- REBOOT=Force
Flags=00000010
end
item: End Block
end
item: End Block
end
item: End Block
end
item: End Block
end
Here is my install IPF File:
item: Check Disk Space
end
item: Get Registry Key Value
Variable=VER8INST
Key=SOFTWARE\Adobe\Acrobat Reader\8.0\Installer
Default=0
Value Name=ENU_GUID
Flags=00000100
end
item: If/While Statement
Variable=VER8INST
Value={AC76BA86-7AD7-1033-7B44-A81100000003}
Flags=00000001
end
item: Execute Program
Pathname=msiexec.exe Command Line=/I AcroRead.msi TRANSFORMS=AcroRead.mst /qb-
Flags=00001010
end
item: End Block
end
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.