Author Archives: Jon

Google Drive direct download link generator

About

This tool allows you to generate a direct download link to files you have stored in Google Drive. A direct link will immediately start downloading the file, rather than opening a preview of the file in Google Drive.

Notes

  • Make sure your file’s visibility in Google Drive is set to “Anyone with the link”. If it’s set to “Restricted” then only people who are logged in to Google and have been granted access to the file will be able to open the direct link (which probably isn’t what you want).
  • This only works for uploaded files, not documents created in Google Docs/Sheets/Slides.
  • If your file is very large, the direct link may first open a page saying that the file is too large for Google to scan for viruses. That page will have a button to download the file.

Enabling xbase/DBF support in Microsoft Office/Access 2013

After upgrading a customer from Windows XP to Windows 7 I recently discovered that Microsoft decided to quietly deprecate native support for xBase/DBF formats (Dbase III, IV and V) formats in Office/Access 2013 which resulted in an unhelpful Error: “Could Not Find Installable ISAM” error message. This was a problem as the customer used a legacy ERP package and still required the support.

Fortunately it is possible restore support for DBF formats in Office/Access 2013 by installing the free Access 2010 runtime and performing a small registry hack.

First install the Access 2010 runtime which can be downloaded from Microsoft’s website here:
http://www.microsoft.com/en-gb/download/details.aspx?id=10910
Installing the runtime before or after Office/Access 2013 worked for me, but your mileage may vary…

Second merge the following registry entries. This was tested on a Windows 7 x64 with the 32-bit version Office so the key locations may vary for 32-bit Windows/64-bit Office installation:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Access Connectivity Engine\Engines\Xbase]
"win32"="C:\\PROGRA~2\\COMMON~1\\MICROS~1\\OFFICE14\\ACEXBE.DLL"
"DbcsStr"=hex:01
"Mark"=dword:00000000
"Date"="MDY"
"Exact"=hex:00
"Deleted"=hex:01
"Century"=hex:00
"CollatingSequence"="Ascii"
"DataCodePage"="OEM"
"NetworkAccess"=hex:01
"PageTimeout"=dword:00000258

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats\dBASE 5.0]
"Engine"="Xbase"
"ExportFilter"="dBASE 5 (*.dbf)"
"ImportFilter"="dBASE 5 (*.dbf)"
"CanLink"=hex:01
"OneTablePerFile"=hex:01
"IsamType"=dword:00000000
"IndexDialog"=hex:00
"CreateDBOnExport"=hex:00
"SupportsLongNames"=hex:00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats\dBASE III]
"Engine"="Xbase"
"ExportFilter"="dBASE III (*.dbf)"
"ImportFilter"="dBASE III (*.dbf)"
"CanLink"=hex:01
"OneTablePerFile"=hex:01
"IsamType"=dword:00000000
"IndexDialog"=hex:00
"CreateDBOnExport"=hex:00
"SupportsLongNames"=hex:00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats\dBASE IV]
"Engine"="Xbase"
"ExportFilter"="dBASE IV (*.dbf)"
"ImportFilter"="dBASE IV (*.dbf)"
"CanLink"=hex:01
"OneTablePerFile"=hex:01
"IsamType"=dword:00000000
"IndexDialog"=hex:00
"CreateDBOnExport"=hex:00
"SupportsLongNames"=hex:00

You should now be able to open your DBF database file successfully in Access 2013.

CentOS 6 Installing Datastax Apache Cassandra

I recently setup a Cassandra environment for a customer, the easiest approach was to utilize the DataStax Yum repository which is detailed below. As detailed previously there is a compatability issue with the OpenJDK default in CentOS so first follow my previous post on installing the Oracle JDK.

Installation

  • As root create /etc/yum.repos.d/datastax.repo:
    [datastax]
    name= DataStax Repo for Apache Cassandra
    baseurl=http://rpm.datastax.com/community
    enabled=1
    gpgcheck=0
  • To install Cassandra, for Apache Cassandra 1.2.x:
    sudo yum install cassandra12
  • Install a copy of JNA jar just for Cassandra
    Note: JNA from base repo is 3.2.4 while Cassandra requires 3.2.7+
    cd /usr/share/cassandra/lib
    sudo wget https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna/3.5.1/jna-3.5.1.jar
    sudo chown cassandra:cassandra jna-3.5.1.jar
    sudo chown 755 jna-3.5.1.jar
  • Fix permissions
    sudo chown -R cassandra:cassandra /var/lib/cassandra
    sudo chown -R cassandra:cassandra /var/log/cassandra

Configuration

  • Create /etc/profile.d/cassandra.sh
    export CASSANDRA_HOME=/usr/share/cassandra
  • Load into current session:
    source /etc/profile.d/cassandra.sh
  • Edit the following settings in /etc/cassandra/conf/cassandra.yaml:
    cluster_name: ''
    ...
    - seeds: ""
    ...
    listen_address:
    ...
    rpc_address: 0.0.0.0

    Note: for more details about configuring and optimizing a multi-node cluster, see sources.
  • Open ports
    7199 for JMX
    9160 for Cassandra Thrift
    7000 for Cassandra Gossip
  • Start cassandra:
    sudo service cassandra start
  • Start cassandra on boot:
    sudo chkconfig cassandra on

CentOS 6 Installing Oracle JDK

Having recently setup a Cassandra environment for a customer I found it would crash with a segmentation fault. I discovered this was due to the OpenJDK that is bundled with CentOS – as a workaround I installed the Sun Oracle JDK using the steps below:

  • Download the appropriate file (e.g jdk-7u45-linux-x64.rpm) JDK from Oracle website. Exact as necessary and install JDK rpm:
    sudo yum localinstall jdk-.rpm
  • Add java as alternative for /usr/bin/java:
    sudo alternatives --install /usr/bin/java java /usr/java/latest/bin/java <priority>
    Note: Default priority of open-jdk is 16000. A higher priority must be selected.
  • To add JAVA_HOME to environment variables create /etc/profile.d/java.sh containing the following:
    export JAVA_HOME=<java_home>
    Note: If Oracle JDK is installed is /usr/java/latest
    Load into current session:
    source /etc/profile.d/java.sh
    Verify
    echo $JAVA_HOME
  • Verify installation
    Command:
    java -version
    Output:
    java version "1.7.0_25"
    Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Parkeon Wayfarer TGX150 Ticket Machine Wireless LAN issues

I encountered an issue recently where the four Cisco Aironet wireless access points deployed at a bus depot in South Yorkshire were not providing sufficient coverage and data downloads from the buses not completing, despite all tests showing it should be excellent.

After some frustration I eventually discovered that some (all?) TGX150 ticket machines are equipped with US and not EU wireless chipsets which means they only work with channels 1-11 and not 1-13 as one would expect in the UK.

If you have having issues with your depot wireless LAN and TGX150 data download I would recommend checking what channels the access points are configured to operate on and adjust accordingly.

SMTP Relay with Office 365 Email Alert Notification

Continuing my experience of migrating from Windows Server 2003 to Windows Server 2012 Essentials I came across a problem configuring the Email Alert Notification. In Small Business Service the SMTP server would be the same machine, however with Exchange cloud hosting on Office 365 this isn’t as straight forward and you must configure an SMTP relay instead as follows:

Step 1: Obtain the SMTP server setting
To obtain the SMTP server setting, follow these steps:

  • Sign in to Outlook Web App.
    Take one of the following actions:
    In Office 365, click Settings , and then click Options.
    In Office 365 pre-upgrade, click Options, and then click See All Options.
  • Take one of the following actions:
    In Office 365, in the left navigation pane, click Account, and then click Settings for POP and IMAP access.
    In Office 365 pre-upgrade, in the left navigation pane, click Account, click My Account, and then, in the Account Information area, click Settings for POP, IMAP, and SMTP access.
    Note the SMTP server setting information that’s displayed on this page.

Step 2: Create a user who has an Exchange Online mailbox
To do this, use one of the following methods:

  • If you’re in a hybrid deployment or if you’re using directory synchronization, create the user in Active Directory, Exchange Management Shell, or either Exchange Management Console or Exchange Admin Center (depending on your version of Exchange Server). Run directory synchronization, and then activate the user by using an Exchange Online license.
  • Note The user must not have an on-premises mailbox.
    Create the user by using the Office 365 portal or by using the Windows Azure Active Directory Module for Windows PowerShell, and then assign the user an Exchange Online license.

Step 3: Set up the Internet Information Services (IIS) SMTP relay server
To set up Internet Information Services (IIS) so that your LOB programs can use the SMTP relay, follow these steps, as appropriate for your situation.

  1. Start Server Manager, click Features, and then click Add Features.
  2. On the Select Features page, select the SMTP Server check box. If you’re prompted, click Add Required Role Services. Note This step automatically installs all prerequisite roles and features, including IIS (if they’re not already installed).
  3. On the Select Features page, click Next. Then, on the Web Server (IIS) page, click Next.
  4. On the Select Role Services page, make sure that the following role services check boxes are selected, and then click Next:
    The ODBC Logging check box under Health and Diagnostics
    The IIS Metabase Compatibility check box in IIS 6 Management Capability under Management Tools
    The IIS 6 Management Console check box in IIS 6 Management Capability under Management Tools
  5. On the Confirm Installation Selections page, click Install.
  6. After the SMTP Server installation is completed, click Finish.
  7. Open IIS 6.0 Manager, right click Default SMTP Virtual Server, and then click Properties.
  8. Click the Access tab, and then click Relay.
  9. In the Select which computers may relay through this virtual server area, click Only the list below, and then enter the IP addresses of the on-premises LOB devices and application servers that will relay through the SMTP server.

    Warning Make sure that you enter only the IP addresses of the devices and servers that you trust. This setting lets you relay mail that’s coming from these sources to any destination. In effect, this makes the on-premises server that’s running IIS an open relay.

  10. On the Access tab, click Authentication, make sure that the Anonymous access check box is selected, and then click OK.
  11. Click the Delivery tab, click Advanced, and then, under Smart host, enter the fully qualified domain name (FQDN) of the SMTP server from the “Step 1: Obtain the SMTP server setting” section.
  12. On the Delivery tab, click Outbound Connections.
  13. In the TCP Port box, type 587, and then click OK.
  14. On the Delivery tab, click Outbound Security, and then follow these steps:
    Click Basic Authentication.
    In the User name box, type the user name of the Office 365 user that you created in the “Step 2: Create a user who has an Exchange Online mailbox” section.
    In the Password box, type the password of the Office 365 user.
    Select the TLS encryption check box, and then click OK.

DFS Replication service is not running – Migrating Server 2003 to 2012 Essentials

I had to recently migrate a customer from Windows Server 2003 to Windows Server 2012 Essentials, unfortuantly the Migration Preparation tool would keep failing on “DFS Replication service is not running”.

DFS Replication service did not exist until Server 2003 R2. So to get round this I made the following modification:

  1. Open SBSMigrationPrep.ps1 located in C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Baseline Configuration Analyzer 2\Models\SBSMigrationPrep.ps1 in Notepad.
  2. Find “DFSR”
  3. We will get the function as shown bellow
    function Check-DFSReplicationServiceStatus()
    {
    $service = Get-Service -Name ‘DFSR’
    $status = $service.Status
    @”

    $status

    “@
    }
  4. Change the contents of “$service = Get-Service -Name ‘DFSR'” to $service = Get-Service -Name ‘DFS’

Once we have done this re-run the Migration and Preparation Tool and it should now complete successfully.

How to enable Alt + Tab in citrix remote desktop/receiver

I was recently frustrated by my remote working provision where I couldn’t use common Windows shortcuts such as the Winkey-D to minimize all open windows or alt+tab to cycle between windows.

Fortuantly there is a workaround for this, simple edit this:
HKEY_LOCAL_MACHINE \SOFTWARE\Citrix\ICAClient\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Keyboard\TransparentKeyPassthrough
or in Windows 7 x64
HKEY_CURRENT_USER\SOFTWARE\Citrix\ICAClient\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Keyboard\TransparentKeyPassthrough

Set the value to be Remote and restart your connection