Category Archives: Programming

VB Script to Delete Files In a Certain Path Having a Certain Extension


Note:  The download file is based on the Technet Script shown below, except that the Echo Confirm Deletion line has been commented-out.  This is a good way to selectively delete those rogue .htaccess files that have been injected into every sub-folder of your website.  Make sure you test this script on a PC on which it will not matter if you happen to mistakenly delete the entire system. USE AT YOUR OWN RISK. BE VERY CAREFUL.  IF YOU DON’T UNDERSTAND THE CODE IN THE SCRIPT, THEN DON’T RUN IT.

DIM strExtensionsToDelete,strFolder
DIM objFSO, MaxAge, IncludeSubFolders

‘ ************************************************************
‘ Setup
‘ ************************************************************

‘ Folder to delete files
strFolder = “D:\test”
‘ Delete files from sub-folders?
includeSubfolders = true
‘ A comma separated list of file extensions
‘ Files with extensions provided in the list below will be deleted
strExtensionsToDelete = “log”
‘ Max File Age (in Days). Files older than this will be deleted.
maxAge = 10

‘ ************************************************************

set objFSO = createobject(“Scripting.FileSystemObject”)

DeleteFiles strFolder,strExtensionsToDelete, maxAge, includeSubFolders

wscript.echo “Finished”

sub DeleteFiles(byval strDirectory,byval strExtensionsToDelete,byval maxAge,includeSubFolders)
DIM objFolder, objSubFolder, objFile
DIM strExt

set objFolder = objFSO.GetFolder(strDirectory)
for each objFile in objFolder.Files
for each strExt in SPLIT(UCASE(strExtensionsToDelete),”,”)
if RIGHT(UCASE(objFile.Path),LEN(strExt)+1) = “.” & strExt then
IF objFile.DateLastModified < (Now – MaxAge) THEN
wscript.echo “Deleting:” & objFile.Path & ” | ” & objFile.DateLastModified
exit for
end if
if includeSubFolders = true then ‘ Recursive delete
for each objSubFolder in objFolder.SubFolders
DeleteFiles objSubFolder.Path,strExtensionsToDelete,maxAge, includeSubFolders
end if
end sub

Can’t Download Novacom Drivers for Windows to Connect HP Touchpad

Here are the Novacom Drivers for Windows 32-bit and 64-bit operating systems.  There are two zip files and select the correct file download for your operating system.  Extract the Zip files to a known folder.  The Zip file includes the Novacom.MSI installer file the HP License Agreement PDF (Date Modified August 2011).

Here is a Video:
How to install Android 5.0.x/4.4.x on the HP TouchPad the Super Easy Way (Idiots Guide 4.0)
By: Roland Deschain. This video explains using the Touchpad Toolbox (TP Toolbox) by J.C. Sullins.


TPToolbox by J.C. Sullins
Here: http://forum.xda-dev…d.php?t=2756314 and

CM11/Android 4.4.2 by J.C. Sullins

The CM11 link above says:
[ROM] [4.4.4] [CyanogenMod 11 by Jcsullins] [DM] [01/13/15]

Downloads:  [See 1., A., B., and C. below]

1.  TPToolbox:  V40 released on 2014-05-18
It can be downloaded from:… or or…

Note:  To load TPToolbox, you will need novacom to be installed on your PC.  See Novacom Links above.

THE TPToolbox will help you load A, B, and C below onto your HP Touchpad:

A.  ROM:  CyanogenMod 11 by JcSullins find the latest one to download.  I used cm-11-20141015-Snapshot but there is a more recent at the bottom of the file download list.

B. DATA MEDIA: (KitKat) Data Media Install files [Note: I used Philz-CWM]

Download traditional CWM:… or or…

Download Philz-CWM: [I used this one]… or or…

Download TWRP:… or or…

C.   G-Apps: KitKat Google Apps  Standard Gapps
Paranoid Android Gapps Choose the Micro or Nano Modular Packs

I either used the (i.) pa-gapps-stock-4.4.4-20141110-signed or the (ii) Gapps-kk-20140606-signed (less trusted).  Need to figure out which works and is compatible with the ROM that you will use.  Try searching for gapps as there may be some on Google Apps in developers sections. Get an inclusive g-apps base package for KitKat.

My Self Notes from Above Resources (no warranties):  Download PDf: Installing-Android-on-Touchpad

Setting File Permissions for MyBB on Linux with Apache

File Permissions

Certain file permissions are required for MyBB to function correctly. Once you’ve uploaded your files you will need to set the permissions on certain files and directories.

** On new installs (not necessarily for upgrades), before applying file permissions, rename config.default.php to config.php

*nix systems via CHMOD
If you have SSH access, you can apply the necessary permissions via the following command, executed from your root MyBB directory:

chmod 666 inc/config.php inc/settings.php
chmod 777 cache/ cache/themes/ uploads/ uploads/avatars/

Optionally, you can also apply the following permissions:

chmod 666 inc/languages/english/*.php inc/languages/english/admin/*.php
chmod 777 cache/ cache/themes/ uploads/ uploads/avatars/ admin/backups/

If you are using FileZilla you can right click on a file or directory and click File Attributes to modify the permissions of that file.

Upgrading MyBB To Version 1.8.0

Upgrade Instructions

These instructions apply to upgrades on Windows server running Apache web server as well as upgrades on linux server installations except that with linux you may need to set various folder permissions.

  • Download MyBB version 1.8.0
  • Extract the website files from the downloaded ZIP file into a temporary folder of your choice
  • Backup your MyBB database and all MyBB website files and folders (in case you need to revert to the previous version 1.6.15 or earlier)
  • Copy the /inc/settings.php and /inc/config.php files to a separate folder (as a backup) so that you can copy them back into the website later
  • Disable any plugins that you have installed
  • You may choose to disable the board, but I didn’t and the upgrade went fine
  • Overwrite the files and folders in the website by coping or FTP uploading all of the new extracted version 1.8.0 files and folders into your website (use the root or forum sub folder that you previously used with the existing installation of MyBB
  • Replace the newly uploaded files named settings.php and config.php with the files those same two files that you previously copied to a separate folder.
  • You may need to delete the “lock” file in the “/install” folder of your website so that you don’t receive an error message alerting you to delete the “lock” file when you access upgrade.php
  • Now for this installation — Open a web browser and enter the address to the page /install/upgrade.php
  • Select the version of MyBB that you were previously running and click Next

2014-10-11 23_15_24-MyBB Installation Wizard _ Welcome

  • Follow the upgrade process making sure each step is completed successfully before clicking next to continue with subsequent steps of the upgrade process
  • Once the upgrade process is completed, then remove the install directory from your web server (or rename it) and follow any remaining instructions in the upgrade wizard, or in the announcement for the upgrade. This can include reverting selected templates to default.

2014-10-11 23_22_37-MyBB Installation Wizard _ Upgrade Complete

  • Enable any plugins one at a time and determine whether they require updating.  Have updated plugins ready to be installed.

Owncloud External USB Storage Via FTP Option on Zpanel Windows Server

This article applies to a self-hosted ownCloud version 7.0.1 which is hosted through a Zpanel on Windows Server 2008 R2, and for which you have remote desktop admin access to the server.

Configuring the External USB and FTP.

Connect USB drive to USB port on the Server.  Check Windows Explorer to see if it is present as Drive (X):\ (where “X” is the drive letter assigned by Windows,  usually drive E:\).  In Windows Explorer, on the USB drive, create a new folder path on the X:\ drive, such as E:\owncloud\external_storage.

Setup the FTP Account in Zpanel.  Log into your Zpanel hosting account to setup an FTP account credential leading to the external USB drive path.  Click on “File Management” and select “FTP Accounts.” Create a new FTP account by entering a username and password.  The access type should be read and write – full access.  Select the radio button to Create a new home directory.  The new home directory will be the same name as the username chosen above.  Click the Create button.

Access Windows Server via Remote Desktop to Adjust the FileZilla FTP Account to Point to the external USB drive file path.  Since Zpanel only creates an FTP within the Directory Path configured for the Zpanel User Account, usually on  “C:\zpanel\hostdata\[Zpanel_username]\External_Storage_username” drive, you need to create an alternate FTP path to the USB Drive storage path.  How?  Log into the Windows Server using Remote Desktop access, and click the Start button, select All Programs, then Zpanel, Management, and open the FileZilla Console.  In the Filezilla console, Select the pre-configured FTP user account that you just established within Zpanel file management.  How? In FileZilla console select Users and select the particular FTP user account you just established.  Select Shared Folders, and you should see the original Home directory path that you pre-configured under Zpanel.  For the same FTP user account, click the “Add” button and add a new directory path leading to your USB file folder path, such as E:\owncloud\external storage.  Select this new path with your mouse and click the button to “Set as home directory,” in order to set this “External Storage” path as the new “Home” default folder.  Make sure for “Files” that you check each checkbox to select all -> read, write, delete, append, and check each check box under Directories to select all -> create, delete, list, +Subdirectory, to ensure these authorizations are granted.  You can leave the existing pre-cofigured Zpanel directory in place. For now, it is no longer the Home directory for the FTP path for this FTP user account. Click OK to exit the zpanel configuration.  You can now exit the FileZilla console.

Enable External Storage in your Owncloud Admin Account.  Log into your administrator account for ownCloud.  Select Apps from the left menu.  Select External Storage Support from the list.  Under the heading External Storage Support 0.2.1, internal app, Mount external storage sources, click the Enable button.

Configure External Storage Via FTP.  Remain logged in under ownCloud Administrator Account.  Select “Admin” from the Menu. Within Admin, under the heading for “External Storage,” click the drop down menu on the button for “Add storage” and select “FTP.”

Change the Folder Name to your desired folder name, such as “Ext” and, under configuration, you probably need to type in localhost (for ftp server location), enter your pre-configured FTP username and your FTP password.  Under “Available For” you can select ALL USERS or a particular user or particular group.

2014-09-21 19_54_06-ownCloud

When you open your ownCloud desktop client or your web interface and login, you should see the new folder named “Ext” in your folder list. If you copy a file to that folder, it will syncronize from the server to all webdav and desktop connected devices.



Solved Zpanel Webalizer Stats Module Not Showing Statistics

It has been reported in the Zpanel Forum that the Webalizer module installed with Zpanel on Windows O/S with Apache hasn’t been functioning since ZPanel version 10.1.0

Here is the Zpanel forum thread that leads to the fix.

Here is the thread that contains the file attachment to be downloaded:

You will need to login or register and login to the forum to download the fix. OnDaemonHour.hook.php

Rename and replace the original OnDaemonHour.hook.php file in the following path:


Thanks, bushr4anger

His quote:

You were on the right track, here’s the fix for windows ( was due to webalizer command string being incorrectly formatted )
Just replace OnDaemonHour.hook.php with the attached file

btw… I used the zGodx module to run zDaemon so I could see instant results

Here is the original download link for the PHP file:

This is the same file in a zip archive:

OwnCloud Updated to Version

2014-08-06 18_07_16-ownCloud

Version was deficient. Owncloud files were accessible, but the admin area did not properly display. The admin link led to a blank white page. All is well now that OwnCloud is updated to version Apparently, Windows server with apache or IIS cannot utilize Word Preview in Docs area even with LibreOffice installed on the server and the path properly set in config.php.

How to Create a WordPress Child Theme

  • Navigate to the themes directory of your WordPress website and create a new child theme sub-folder in the path of your themes folder (for example, yourwebsitedomain/wp-content/themes/ChildTwentyFourteen/).  This sub-folder is going to be your new child theme folder for your current themes.  Mane the sub-folder something like “ChildTwentyFourteen” or be a little more creative than me.
  • Search Google for — child theme wordpress codex — and the first link that you should find and follow is to
  • On the codex support page which will be displayed from your search, please locate and copy the gray block of code to your clipboard memory.  Make sure you copy every line including the /* — */ comment part.  The code you copy should look like this:

Theme Name: Twenty Fourteen Child
Theme URI:
Description: Twenty Fourteen Child Theme
Author: John Doe
Author URI:
Template: twentyfourteen
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fourteen-child

@import url(“../twentyfourteen/style.css”);

/* =Theme customization starts here
————————————————————– */

  •  Open your child theme folder and create a new text file called style.css.  Open the style.css file with your php editor, like notepad++ and paste into that file the code contents that you just copied to your clipboard (that is, paste the above code to the style.css file) and save the file contents of style.css.
  • You can modify each of the lines in the style.css file.  The required lines are the theme name, the Template, and the @import url line
  • Theme customization begins below the dashed line — like css changes.
  • Note: The child theme’s stylesheet is included after the parent theme’s and, consequently, the child theme styles will override those in the parent theme’s stylesheet.
  • Activate your childtheme in your wordpress administrative panels — Appearance — Themes.

You can override main content theme with your child theme content as follows.  For example, to remove or change the contents of the wordpress footer “Proudly Powered by WordPress,” you would first make a copy of footer.php (copied from the main theme folder and pasted into your child theme folder).  Open your child theme copy of the footer.php file using Notepad++ editor and edit the code.  Save the modified footer.php file.  Refresh your wordpress site and check your changes.

How to Enable or Disable the Demo Store Notification in Magento

You can configure Magento eCommerce to display a notice when your store is in demo mode to ensure that your customers know that their orders will not be processed.

Log into the Magento admin panel and hover your mouse pointer over the “System” tab on the horizontal menu. Select “Configuration” from the drop down list. Under “GENERAL” on the vertical menu on the left, select “Design” and then select “HTML Head” on the submenu on the right side. Scroll down and you will see a “Yes/No” toggle option appearing next to “Display demo store notice.”

To Enable/disable the Demo Store Notification make your selection Yes/No from the drop down toggle and click the “Save Config” button at the top right of your display in order to save this configuration change.