Hi,
I have a script that repairs an application which has a x86 and x64 bit version of it installed. The script checks the folder size as follows:
$FolderX86Size = ((Get-ChildItem "C:\Program Files (x86)\TestApp" -Recurse | Measure-Object -Property Length -Sum).Sum / 1MB)
if($FolderX86Size -lt 20 do repair....
$FolderX64Size = ((Get-ChildItem "C:\Program Files\TestApp" -Recurse | Measure-Object -Property Length -Sum).Sum / 1MB)
if($FolderX64Size -lt 25 do repair....
When I run this script outside of Software Center it is working perfectly. When I run this script deployed as a "package" in SCCM it never tries to repair X64 but works for X86.
Is there something special required to get a script to work or be able to check correctly X64 folders within SCCM? TIA