PCgoblin's Blog

Fixing everyday PC problems on my PC

Fix problem when ACT cannot open its database: The “.” computer could not be reached

Every few days, when I try to load ACT, this fails, and I get the message:

The “<HOSTCOMPUTER NAME>” computer could not be reached because the IP address”” could not be resolved. Verifying the “<HOSTCOMPUTER NAME>” computer is available on the network, that is has the correct IP address, and that Microsoft SQL Server is properly installed may resolve this issue.

In my case instead of “<HOSTCOMPUTER NAME>” I see just “.”, probably as I am running ACT only on my local PC.

Error message when attempting to load ACT

Error message when attempting to load ACT

The first time this happened, I fixed my immediate problem, as follows – but it kept recurring:

  • Click the Windows Start button, and then click Run. The Run dialog box appears.
  • Type services.msc into the Open field, and then click OK. The Services snap-in launches.
  • Locate the entry for SQL Server (ACT7). I noticed that the service has not started, in spite of being set as Automatic. I right-clicked and then selected Start.
SQL Server (ACT7) service has not started

SQL Server (ACT7) service has not started

So I began looking for a permanent way of stopping this happening again.

  • Click the Windows Start button, then click on All Programs, then on Accessories.
  • Right-click on Command Prompt, then select Run as administrator.
  • The command prompt will be displayed, with the window entitled Administrator: Command Prompt.
  • Type the following sc config MSSQL$ACT7 depend= "Disk", then hit the Return key

    Set SQL Server service for ACT to depend on the disk driver

    Set SQL Server service for ACT to depend on the disk driver

After this, you can check that the dependency is correctly set:

  • Click the Windows Start button, and then click Run. The Run dialog box appears.
  • Type services.msc into the Open field, and then click OK. The Services snap-in launches.
  • Locate the entry for SQL Server (ACT7). I noticed that the service has not started, in spite of being set as Automatic.
  • Right-click on this entry and select Properties.
  • Select the Dependencies tab. This now shows that the SQL Server service for ACT depends on Disk Driver:

    SQL Server now with dependency on Disk Driver service

    SQL Server now with dependency on Disk Driver service

(Technical note: After adding this dependency, registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MSSQL$ACT7 will contain a multi-string value (of type REG_MULTI_SZ) called DependOnService with the value Disk.)
Hopefully this cures your problem!

February 8, 2014 Posted by | Uncategorized | , , , | Leave a comment

Add custom syntax formatting to Notepad++ for VFP (Visual FoxPro)

I am a great fan of the open-source Notepad++, the ideal — and free-of-charge — text editor.

Notepad++  overcomes the severe limitations of the basic Notepad which comes with Windows.

As an occasional user of VFP 9 (Visual FoxPro), I wondered how to use Notepad++ as my default editor for .PRG files.

Being extensible, Notepad++  allows for user defined language files, to add syntax colouring. and formatting. An extensive list of languages is provided for download on Sourceforge.

To install support for VFP:

  • Locate the entry for Visual FoxPro and download file userDefineLang_VisualFoxPro.xml.
  • Check whether you already have a userDefineLang.xml.  As mentioned on the SourceForge page, with my 64-bit Windows 7, rather than this being in C:\Program Files (x86)\Notepad++, it was required in <user>\AppData\Roaming\Notepad++.
  • If you do not have an userDefineLang.xml file already: save the file userDefineLang_VisualFoxPro.xml in this folder, then rename it to userDefineLang.xml.
  • If you do have an userDefineLang.xml file already: select all the text from userDefineLang_VisualFoxPro.xml, and paste it at the end of userDefineLang.xmlThis will probably have created a spurious </Notepad_Plus><Notepad_plus> pair (or similar) in the middle, each tag on a line by itself. Remove these two consecutive lines.
  • Close Notepad++.
  • Run Notepad++.
  • Take menu option Languages. Near the bottom of the menu you should find an entry for “Visual FoxPro”. Syntax formatting should now work for this!

April 10, 2013 Posted by | Uncategorized | , , | 2 Comments

How to extract files from a .MSI file

Today I found some files on an installed system of mine had become damaged. I reinstalled the software, but this did not fix the problem.

So I thought the next thing is to get good copies of the files I wanted from the .MSI file I already had.

Of course how to do this? I found a terrific – and free – utility called LessMSI described as “a utility with a graphical user interface and a command line interface that can be used to view and extract the contents of an MSI file”. Just what I needed.

You can get more information and download this from Google code pages at code.google.com/p/lessmsi/.

The GUI is very simple and intuitive, so I had no problem locating the files I needed in the MSI and extracting only them. Problem solved!

April 3, 2013 Posted by | Uncategorized | , | Leave a comment

Permanently Remove Empty Rows/Columns at the End of an Excel Spreadsheet

Ever have blank rows or columns at the end of an Excel sheet? Where <CTRL END> goes way beyond your useful cells?

I just found this very easy way to remove them.

February 6, 2013 Posted by | Uncategorized | | Leave a comment

Fix large blank space in Add/Remove Programs

When I went into Add/Remove programs on one XP computer I support, with the programs sorted in name order, I was shocked to see lots of blank entries right after an entry for a program from Apple. This was nothing  to do with an Apple program but rather a problem with AutoCad.

Kelly Theriot of Kelly’s Korner has a very easy fix for this.

If you have AutoCad installed you will want to try this. But if AutoCad is not installed, you have a different problem and will not want this fix!

I did the following:

  • Download the file autocadaddremovefix.zip
  • Unzip or uncompress the two files included into a convenient folder
  • Close  Add/Remove Programs
  • Run a command prompt
  • Type the following into the command line: cscript autocadaddremovefix.vbs //T:100
  • Then hit the Enter key

When I then ran Add/Remove Programs, my blank space problem was fixed.

January 9, 2013 Posted by | Uncategorized | | Leave a comment

Link documents in Word using relative paths

When inserting Word documents as “links” into a master Word document, paths are entered as absolute references. This means that if you move the linked group of files to another system – even if they are in just one folder – the links no longer work.

Although the Word designers have not allowed an easy option for relative paths, this can be achieved. Thanks to MVP Macropod (Paul Edelstein) for expanding on a solution originally posted in the microsoft.public.word.mailmerge.fields NG by Peter Jamieson, another MS Word MVP.

Using INCLUDEPICTURE fields as an example:

First off, Insert a FILENAME field, with the path switch (see under Insert|Field), anywhere in your document.
Next, press Alt-F9 to reveal your document’s field codes. A FILENAME field will look like:
and an INCLUDEPICTURE fields will look something like:
{INCLUDEPICTURE “C:\\My Documents\\My Pictures\\Image.png “}
{INCLUDEPICTURE “C:/My Documents/My Pictures/Image.png “}
Some fields might have other switches after the file’s name, which you might want to keep, but they aren’t relevant to the rest of the discussion below. You can find out what the switches are for from Word’s help file, or via Insert|Field.

To make an INCLUDEPICTURE field look in the current folder, cut & paste the FILENAME field into it, replacing the document path and inserting ‘\\..\\’ or ‘/ /’ between that and the hyperlink file’s name, thus:
{INCLUDEPICTURE “{FILENAME \p}\\..\\Image.png”}

How this works: The FILENAME p field extracts the current file’s name and path. The following ‘\\..\\’ or ‘/../’ tells Word to ignore the filename and get just the path. Then all you need to do is to add the source file’s name & extension.

For Macropoint’s posting, which includes information on referring to other folders and a search/replace solution with downloadable macro, see Relative Paths in Word Fields.

Information on field codes in Word 2003 from Microsoft.

January 6, 2013 Posted by | Uncategorized | , | Leave a comment

Move a window lost off the desktop back to your screen

Losing your position on the screen, when a window gets misaligned and disappears off to one side, is always irritating.

You can get access to a small menu with a move option by pressing alt-space, then pressing the M key. Do not worry if you do not see the menu when you press alt-space, just press the M key. Then use the cursor keys to move the window to where you want it.

This should work with all programs, in all versions of Windows.

Has rescued me more than once!

February 14, 2012 Posted by | Uncategorized | | Leave a comment

XML documentation parse error: Whitespace is not allowed at this location. XML comment will be ignored.

When today I copied a chunk of text into the XML <history>tag in my VB program, I got the error message “XML documentation parse error: Whitespace is not allowed at this location”.

Removing spaces made no difference, leaving me baffled. A quick search on the web found an article which quickly resolved this. Thanks Kennon McCaa for saying that ampersands & (and other characters) can cause this. When I replaced all “&” with “and”, this fixed my problem. See Ah, the memories… XML documentation parse error: Whitespace is not allowed at this location. XML comment will be ignored.

January 5, 2012 Posted by | Uncategorized | , , , | Leave a comment

Fix Google Chrome 13 ” print preview failed”

When I upgraded Google Chrome a few days ago to version 13, I was excited about the Print Preview feature. Unfortunately though, it did not work for me. In fact, I could not longer print anything via Chrome, as Print Preview replaced the previous – and standard – print dialogue box.

After looking for help, I found many other users suffering the same problem.

As I have Windows 7, the advice was to change my short-cut for Google to the following:
C:\Users\<my user name>\AppData\Local\Google\Chrome\Application\chrome.exe –disable-print-preview

This worked beautifully, as my trusty print dialogue box returned.

FURTHER NEWS – A few days later, this fix seemed no longer to work for me. (Chrome version 13.0.782.112 m). As I wondered about ditching Chrome, I realised that I had run this instance of Chrome without the command line option. I tried again using the option and had no problem. So, be careful!

See thread on the official Google support forum How do I disable the new Chrome Print Preview feature?. I must say that I find the limited response from Google very frustrating. Surely they should listen to users?

August 6, 2011 Posted by | Uncategorized | , | 1 Comment

Google Chrome tools

Control panel for Chrome add-ins/plugins:

Control panel for experimental options in Google Chrome:

For a list of other short-cuts, see pxuan.wordpress.com/2011/07/18/about-and-chrome-urls/

August 1, 2011 Posted by | Uncategorized | | Leave a comment