Mick's IT Blogs

Mick's IT Blogs

25 June 2012

Enable/Disable Offline Files

Posted By: Mick Pletcher - 10:50 AM
Here is a VBScript that will either enable or disable offline files. It can also be done as a policy by modifying the registry key listed below, or through a group policy.

Policy Registry key for disabling offline files. Change the 00000001 to 00000000 to enable.
 Windows Registry Editor Version 5.00  
 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\NetCache]  
 "DisableFRAdminPin"=dword:00000001  

VBScipt that enables/disables the Offline File Cache
 '*******************************************************************************  
 '     Program: Install.vbs  
 '      Author: Mick Pletcher  
 '        Date: 25 June 2012  
 '    Modified:   
 '  
 ' Description: This will enable or disable the Offline File Cache  
 '                 1) Set Offline File Cache  
 '*******************************************************************************  
 Option Explicit  

 REM Set Offline File Cache   
 SetOfflineFileCache()  

 '*******************************************************************************  
 '*******************************************************************************  
 Sub SetOfflineFileCache()  

      REM Define Local Constants  
      CONST Disable = "False"  
      CONST Enable  = "True"  

      REM Define Local Objects  
      DIM oShell : SET oShell = CreateObject("Wscript.Shell")  

      REM Define Local Variables  
      ' Change the variable at the end of the Install Variable to either Enable or Disable  
      DIM Install : Install = "wmic path win32_offlinefilescache call enable" & Chr(32) & Disable  

      oShell.Run Install, 1, True  

      REM Cleanup Local Variables  
      Set Install = Nothing  
      Set oShell  = Nothing  

 End Sub  

23 June 2012

4G Signal Dies in Walmart Stores

Posted By: Mick Pletcher - 7:15 PM
You walk into the Walmart store and your wireless 4G device comes to almost a screeching halt. This is not uncommon inside the newer Walmart buildings. It is caused by the corrugated metal roofs they use. If you stand back in a corner and look up inside the store, it is nothing more than a warehouse that fills the visual field of the human eye with decorations to give the illusion of a real department store, when in essence, it is nothing more than a warehouse building. The metal roof acts the same as a faraday cage, which the shorter the wavelength, the more shielded the signal is.

20 June 2012

Apple QuickTime Installation

Posted By: Mick Pletcher - 9:53 AM
In order to deploy QuickTime, you will need to extract all of the components to a directory. The installation executable that is downloaded from Apple's site can easily be opened with 7-zip to extract them. In the environment I work in, we are setting the applications to auto-update themselves. I have made it easy in the script to change this in the variables in the subroutine InstallQuickTime().

If you want to disable desktop shortcuts, set SearchDesktopShortcuts and DesktopShortcuts to 0. If you want to disable updates, set ScheduleUpdates and CheckForUpdates to 0. I have also included the subroutine DisableQTTASK(). This deletes the registry key that sets QuickTime to be loaded into memory every time the computer boots up. You can comment out the call to the subroutine if you don't want this disabled. 

If you do not want QuickTime to check the currently installed version on the PC, then you will have to open up the QuickTime.msi in Orca and delete the "NOT BNEWERPRODUCTISINSTALLED" row from the LaunchCondition Table. This is if you are downgrading the QuickTime from a later version that is already installed. Once you have finished editing the MSI and created the MST file, I have already put a variable in the InstallQuickTime() subroutine for an MST file. You will just need to change the filename in that variable and add the Transform variable between MSI and Logs variables in the Install variable.

Here is a link to download the script.


 '*******************************************************************************  
 '     Program: Install.vbs  
 '      Author: Mick Pletcher  
 '        Date: 20 June 2012
 '    Modified:  
 '  
 '     Program: Apple QuickTime  
 '     Version: 7.7.2  
 ' Description: This will install Apple QuickTime  
 '                 1) Define the relative installation path  
 '                 2) Create the Log Folder  
 '                 6) Install Apple Application Support  
 '                 6) Install QuickTime  
 '                 6) Install Apple Software Update  
 '                 7) Cleanup Global Variables  
 '*******************************************************************************  
 Option Explicit  

 REM Define Constants  
 CONST TempFolder = "c:\temp\"  
 CONST LogFolderName = "QuickTime"  

 REM Define Global Variables  
 DIM LogFolder   : LogFolder = TempFolder & LogFolderName & "\"  
 DIM RelativePath : Set RelativePath = Nothing  

 REM Define the relative installation path  
 DefineRelativePath()  
 REM Create the Log Folder  
 CreateLogFolder()  
 REM Install Apple Application Support  
 InstallAppleApplicationSupport()  
 REM Install QuickTime  
 InstallQuickTime()  
 REM Install Apple Software Update  
 InstallAppleSoftwareUpdate()  
 REM Disable QTTASK from Startup  
 DisableQTTASK()  
 REM Cleanup Global Variables  
 GlobalVariableCleanup()  


 '*******************************************************************************  
 '******************************************************************************* 
 
 Sub DefineRelativePath()  

      REM Get File Name with full relative path  
      RelativePath = WScript.ScriptFullName  
      REM Remove file name, leaving relative path only  
      RelativePath = Left(RelativePath, InStrRev(RelativePath, "\"))  

 End Sub  

 '*******************************************************************************  

 Sub CreateLogFolder()  

      REM Define Local Objects  
      DIM FSO : Set FSO = CreateObject("Scripting.FileSystemObject")  

      If NOT FSO.FolderExists(TempFolder) then  
           FSO.CreateFolder(TempFolder)  
      End If  
      If NOT FSO.FolderExists(LogFolder) then  
           FSO.CreateFolder(LogFolder)  
      End If  

      REM Cleanup Local Variables  
      Set FSO = Nothing  

 End Sub  
 '*******************************************************************************  

 Sub InstallAppleApplicationSupport()  

      REM Define Local Objects  
      DIM oShell : SET oShell = CreateObject("Wscript.Shell")  

      REM Define Local Variables  
      DIM MSI        : MSI        = Chr(32) & RelativePath & "AppleApplicationSupport.msi"  
      DIM Logs       : Logs       = Chr(32) & "/lvx" & Chr(32) & LogFolder & "AppleApplicationSupport.log"  
      DIM Parameters : Parameters = Chr(32) & "/qb- /norestart"  
      DIM Install    : Install    = "msiexec.exe /i" & MSI & Logs & Parameters  

      oShell.Run Install, 1, True  

      REM Cleanup Local Variables  
      Set Install    = Nothing  
      Set Logs       = Nothing  
      Set MSI        = Nothing  
      Set oShell     = Nothing  
      Set Parameters = Nothing  

 End Sub  
 '*******************************************************************************  

 Sub InstallQuickTime()  

      REM Define Local Objects  
      DIM oShell : SET oShell = CreateObject("Wscript.Shell")  

      REM Define Local Variables  
      DIM SearchDesktopShortcuts : SearchDesktopShortcuts = Chr(32) & "REGSRCH_DESKTOP_SHORTCUTS=0"  
      DIM ScheduleUpdates        : ScheduleUpdates        = Chr(32) & "SCHEDULE_ASUW=1"  
      DIM CheckForUpdates        : CheckForUpdates        = Chr(32) & "ChkOptInstASU=1"  
      DIM DesktopShortcuts       : DesktopShortcuts       = Chr(32) & "ChkOptInstShortcuts=0"  
      DIM MSI                    : MSI                    = Chr(32) & RelativePath & "QuickTime.msi"  
      DIM Logs                   : Logs                   = Chr(32) & "/lvx" & Chr(32) & LogFolder & "QuickTime.log"  
      DIM Transform              : Transform              = Chr(32) & "TRANSFORMS=" & Chr(34) & RelativePath & "QuickTime.mst" & Chr(34)  
      DIM Parameters             : Parameters             = Chr(32) & "/qb- /norestart" & SearchDesktopShortcuts & ScheduleUpdates & CheckForUpdates & DesktopShortcuts  
      DIM Install                : Install                = "msiexec.exe /i" & MSI & Logs & Parameters  

      oShell.Run Install, 1, True  

      REM Cleanup Local Variables 
      Set CheckForUpdates        = Nothing
      Set DesktopShortcuts       = Nothing
      Set Install                = Nothing  
      Set Logs                   = Nothing  
      Set MSI                    = Nothing  
      Set oShell                 = Nothing  
      Set Parameters             = Nothing  
      Set ScheduleUpdates        = Nothing
      Set SearchDesktopShortcuts = Nothing
      Set Transform              = Nothing  

 End Sub  

 '*******************************************************************************  

 Sub InstallAppleSoftwareUpdate()  

      REM Define Local Objects  
      DIM oShell : SET oShell = CreateObject("Wscript.Shell")  

      REM Define Local Variables  
      DIM MSI        : MSI        = Chr(32) & RelativePath & "AppleSoftwareUpdate.msi"  
      DIM Logs       : Logs       = Chr(32) & "/lvx" & Chr(32) & LogFolder & "AppleSoftwareUpdate.log"  
      DIM Parameters : Parameters = Chr(32) & "/qb- /norestart"  
      DIM Install    : Install    = "msiexec.exe /i" & MSI & Logs & Parameters  

      oShell.Run Install, 1, True  

      REM Cleanup Local Variables  
      Set Install    = Nothing  
      Set Logs       = Nothing  
      Set MSI        = Nothing  
      Set oShell     = Nothing  
      Set Parameters = Nothing  

 End Sub  
 '*******************************************************************************  

 Sub DisableQTTASK()  

      REM Define Local Objects  
      DIM oShell : SET oShell = CreateObject("Wscript.Shell")  

      REM Define Local Variables  
      DIM Install : Install = "REG.EXE DELETE" & Chr(32) & Chr(34) & "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" & Chr(34) &_  
                                    Chr(32) & "/v" & Chr(32) & Chr(34) & "QuickTime Task" & Chr(34) & Chr(32) & "/f"  

      oShell.Run Install, 1, True  

      REM Cleanup Local Variables  
      Set Install = Nothing  
      Set oShell  = Nothing  

 End Sub  

 '*******************************************************************************  

 Sub GlobalVariableCleanup()  

      Set LogFolder    = Nothing  
      Set RelativePath = Nothing  

 End Sub  

12 June 2012

SMS/SCCM Query for all Adobe CS3 products

Posted By: Mick Pletcher - 3:01 PM
This query will return a list of all systems with Adobe CS3 products. It omits the useless products such as Stock Photos, Asset Services, and such.

 select distinct SMS_R_System.Name, SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName 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 like "Adobe Acrobat%" or SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like 
"%CS3%" or SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Creative Suite 3%") and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Anchor Service%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Linguistics%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Bridge%" and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName 
not like "Adobe Device Central%" and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe XMP Panels%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Stock Photos%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Asset Services%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Help Viewer%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Version Cue%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Default Language%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Update Manager%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe SING%" and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName 
not like "Adobe WAS%" and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Add or Remove Adobe Creative 
Suite 3%" and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe After Effects%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe Glyphlet%" and 
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Adobe XMP DVA Panels%" order by SMS_R_System.Name  

11 June 2012

"Unable to complete activation. Device not registered" on your iPhone/iPad

Posted By: Mick Pletcher - 7:24 PM
This error occurs when you install an ipsw file on your iDevice which has not been registered at the iOS Provisioning Portal. I got this error when I installed iOS 6 and had not realized I had only registered my iPad and not my iPhone at the Portal. In order to register the device at the Portal, you will need your UDID number (40 digits). Because you have already pushed the OS down to your device, it is no longer possible to retrieve it there. iTunes will not display it either, as it requires the device to be registered.

The best way to do this is to go to an iTunes backup on your PC. The UDID number is the name of the directory backups and is located here: C:\Users\<username>\AppData\Roaming\Apple Computer\MobileSync\Backup. There will be more than one number there if you have other iDevices. If you do have multiple devices and don't know which one is which, here is how to identify them. Double-click on the UDID directory name. Open up info.plist in notepad. On line 8, it will tell if it is an iPhone or iPad.

If there are more UDID directories than devices you have, then there are probably backups present from devices you had that you upgraded from. In this case, you will need to retrieve the IMEI number, which is available from the opening screen of the setup on the iDevice. To get this number, tap the power button to turn off the display. Tap it again and you will see the iPhone screen with a information button near the bottom. Click the button and the IMEI number will show up on the screen. Now match that number up in the info.plist file and you will then know which directory name to copy and paste into the provisioning portal.

If you got a hold of the ipsw file and installed it on your device without a developers license, then you are screwed...............just kidding! You have two options 1) Purchase a developers license from Apple for $99 or 2) Purchase a UDID number from a third party. If you choose option 2, then I suggest you Google Activate UDID Number

04 June 2012

SMS 2003 WQL Compatibility in SCCM

Posted By: Mick Pletcher - 12:19 PM
When we started the conversion of SMS 2003 to SCCM 2012, I was really skeptical and dreaded to have to recreate all of the queries and collection limiting collections from scratch. The good news is that WQL has changed very little, if any, in the past 10 years. I have been able to directly copy the WQL code from SMS queries to SCCM queries with no changes needing to be made. The WMI classes, specifically SMS_ classes, are still named the same.

Copyright © 2013 Mick's IT Blogs™ is a registered trademark.