Running “Ping.exe” inside Excel through VBA

During this video tutorial, I will demonstrate how to run ping commands inside Excel. This can be used for many dos commands. This worksheet was originally written to do a nslookup on values; however, for this video it was quickly changed to run the ping command. The excel macro enabled workbook uses VBA, and is a very straight forward example of using Excel in non-traditional ways.

The workbook from the video (with the code) can be downloaded here.

Posted in Uncategorized | 15 Comments

Extracting Java MSI

Intro : This example will demonstrate how to extract the Java MSI for Version 6 update 25. The MSI can be used for network deployment in an Active Directory environment through a GPO. The msi will need to be placed in a network share, along with other files that are extracted from the Java exe install file.

1. Download the stand alone (aka offline) Java install file.

2. Install Java on your PC.

3. Once the installation is complete, open up My Computer and type “%appdata%” into the address bar.

4. Depending on your operating system, the browser window may take you to “%appdata%/Roaming” . Navigate one folder up, and in there will be a folder “LocalLow”.

5. Navigate to “%AppData%\LocalLow\Sun\Java\jre1.6.0_25” Inside this folder will be all the files necessary to deploy Java. Copy all these files to a network share, and create a GPO to deploy the software.

Summary : The hardest part of this process is getting to the “%appdata%/LocalLow” folder. Java has a similar tutorial on their website. Please ask questions in the comments below.

Posted in Uncategorized | Leave a comment

Disabling Flash Update Notification through VbScript

Introduction : The AutoUpdate Notification for Adobe Flash can only be disabled by creating a UTF-8 encoded text file named mms.cfg in the appropriate folder. In this post, we will go through the steps of creating the mms.cfg file, creating a VbScript to copy the file, and a GPO (Group Policy Object) to deploy the solution.

Part 1: Creating mms.cfg 

The file mms.cfg controls many aspects of flash. Today, we will be focusing soley on disabling the AutoUpdate feature. For the other commands that can be added, please visit the Adobe Administration Guide (Chapter 4). Ok, lets get started.
  1. Open Notepad
  2. Type in the following line “AutoUpdateDisable=1”



  3. Save the File. Name the file mms.cfg and change the encoding to UTF-8 
    Important : This will not work unless it is in UTF-8 ecoding. 
    Save File as : Name - mms.cfg Encoding - UTF-8

    Save File as : Name - mms.cfg Encoding - UTF-8

  4. Copy the file to a network share. (This is needed for the script to run).

Part 2 : Creating the Script 

Depending on the operating system, the mms.cfg file will need to be copied in to a specific place. Below is a listing of the various locations:

  • Windows NT, 2000— C:\WINNT\System32\Macromed\Flash
  • Windows XP, Vista —C:\WINDOWS\System32\Macromed\Flash
  • Windows 95, 98, or ME–C:\Windows\System\Macromed\Flash
  • Windows 7, Vista 64-bit — C:\Windows\SysWOW64
  • Copy the following code into Notepad. On line 5, insert the location of mms.cfg on the network share inside the quotes. Save it as DisableFlashNotification.vbs

    '====Disable Flash Notification VbScript=====
    'Location of mms.cfg on network share
    dim mmsConfigFile
    mmsConfigFile = "!!!INSERT NETWORK SHARE PATH FOR mms.cfg FILE!!!"
    '_________Do not edit below this line___________________________
    'File System Variables
    dim filesys
    set filesys=CreateObject("Scripting.FileSystemObject")
    'Create array of all places that mms.cfg can be.
    dim flashLocArray(4)
    flashLocArray(0) = "C:\WINNT\System32\Macromed\Flash\" 	 'Windows NT, 200
    flashLocArray(1) = "C:\WINDOWS\System32\Macromed\Flash\" 'Windows XP, Vista
    flashLocArray(2) = "C:\Windows\System\Macromed\Flash\"	 'Windows 95, 98, ME
    flashLocArray(3) = "C:\Windows\SysWOW64\"		 'Windows 64bit
    'Check to see if mms.cfg file exists
    If filesys.FileExists(mmsConfigFile) Then
    	For Each location in flashLocArray
    	flashCopyFile location, mmsConfigFile
    End If
    '==== Function Copy File =======================
    Function flashCopyFile(strLocation, mmsConfigFile)
    dim filesys
    set filesys=CreateObject("Scripting.FileSystemObject")
    	If filesys.FolderExists(strLocation) Then
    	Const OverwriteExisting = True
    	filesys.CopyFile mmsConfigFile, strLocation, OverWriteExisting
    	End if
    End Function
    '==== END Function Copy File ===================

    NOTE: This script works great on the many flavors of Windows when deployed through Group Policy. If the script is started manually on Windows 7 64bit, the script will crash. This happens due to insufficient rights to copy a file to the C:\Windows\SysWOW64 folder. Only Windows 7 64bit has this problem when ran manually. If deployed through a GPO (Group Policy Object), the script will function nicely regardless of the client operating system (include Windows 7 64bit).

    Part 3: Creating a GPO to deploy the script

    1. Start Group Policy Management
    2. Right Click on Group Policy Objects and click New

      Create a new GPO

      Create a new GPO

    3. Type in a name. This example used “Disable Flash Update Notification”

      GPO Title

      GPO Title

    4.  Expand the Group Policy Objects and right click on the newly created GPO “Disable Flash Update Notification” and click Edit.
    5. Click on Computer Configuration,  Policies,  Windows Settings,  Scripts (Start/Shutdown)

      Group Policy Management Editor

      Group Policy Management Editor

    6. Double click on Startup
    7. Click Add

      Startup Properties

      Startup Properties

    8. Click on Add
    9. Paste the DisableFlashNotification.vbs into the window so the screen looks like the picture below. Once the file has been pasted, click open.

      Upload Script into the GPO

      Upload Script into the GPO

    10. Click Ok on all following windows.
    11. Apply the GPO to the appropriate OU (Organizational Unit).

    Summary :

    The only way to test if this is working is to use a packet sniffer. Flash does have a settings manager; however, it will not reflect the changes made inside the mms.cfg. Using a packet sniffer to test this is beyond the scope of this article, and it is a very cumbersome process. Directions on how to do this can be found here at Adobe’s website. I have found it best to look inside the various Window’s directories to see if the mms.cfg was copied over. Please ask questions in the comments below.

    Posted in Computer, Computers | 5 Comments

    BUSD : Banning Unified School District

    It has now been 4 months, and I really enjoy my job at BUSD. Over the time, I have been able to find programming tasks that have pushed my knowledge. Also, the support side has allowed me to watch some really good teaching techniques. I am going to go back in time, but when I taught, students would rarely ever speak out loud when I asked a question. This was fine by me since the students were all processing the question inside their head. What always catches me off guard is when I ask a question during a presentation to adults. All of a sudden I hear people answering the question. Completely catches me off guard every time. One of the teachers I was able to observe did the following

    To limit students from just blurting out answers, (also to give everyone time to think about the question) she would hold her hand up and when she dropped it, the students would all speak their answer aloud. This simple technique was ground breaking for me.

    • All students were participating ( as opposed to just one student always answering the question for everyone).
    • Student were given time to think. When presented new material, the brain takes longer to develop an answer. 3 seconds is usually a good wait time, and by this teacher holding her hand up, she guaranteed all students had about 3 seconds of processing time
    • The teacher was able to quickly assess how many students were understanding the material by participation level and the answers she heard aloud.

    Watching great teaching has always interested me, and it always makes me wonder how I incorporate certain techniques and styles in my own presentations. Besides the computer work I am able to do for the school district, I really enjoy helping and watching the teachers.

    Posted in Computer, Computers, Teaching | 1 Comment