www.geekybob.com

Just a short, simple blog for Bob to share his thoughts.

Useful FrontPage Links

04 January 2007 • by Bob • FrontPage

 

I had a bunch of FrontPage shortcuts lying around, so I thought that I should list them together in a single blog.

FrontPage Themes and Templates

Much like inserting a hit counter on your web page, nothing screams "amateur" faster than using one of the built-in FrontPage themes or templates to design your web site. That being said, not all FrontPage themes and templates are bad - it's just that many of them are so awful that they give the rest of the market a bad name.

Personally, I have seen several professionally-designed templates that use FrontPage's Dynamic Web Templates (*.DWT) to construct the look and feel for some really great-looking web sites. It pays to be choosy, of course, and find the right theme/template that works for your target audience. With that in mind, I have several theme and template sites listed below.

For a large collection of non-FrontPage-specific templates, see the Open Source Web Design website at the following URL:

FrontPage Add-ins

At one time there were a bunch of add-ins for FrontPage lying around on the Internet, but sadly those days are gone. Just the same, here are a few of the remaining links that contain Add-ins for FrontPage:

FrontPage Administration

This is probably one of the most useful links for the FrontPage Server Extensions, but be forewarned - it's not an easy guide to follow:

FrontPage Software Development Kits (SDKs)

The FrontPage SDKs are no longer available from Microsoft, so I have them mirrored here:

File DescriptionFile LinkFile Size
FrontPage 1.0 SDK fpsdk10.zip 3.25 mb
FrontPage 1.1 SDK fpsdk11.zip 706.24 kb
FrontPage 97 SDK fpsdk20.zip 1.04 mb
FrontPage 98 SDK fpsdk30.zip 1.46 mb
FrontPage 2000 SDK fpsdk40.zip 797.12 kb
FrontPage 2002 SDK fpsdk50.zip 1.52 mb

2025 UPDATE: This post was written several years ago, and many of the links were no longer there. However, during a review of old blogs, I updated the old URLs to use the Internet Archive, so the links in this blog appear to work as they did when the blog was first written.

Using WSH to create an off-line backup of a FrontPage-enabled Web Site

02 January 2007 • by Bob • FrontPage, Scripting

As the old adage says, "Necessity is the mother of invention." With that in mind, I had a friend drop by my office the other day and ask me a question that started me on another quest for code.

What he asked me was whether there was a way where he could create an off-line backup of his web site. Of course, there are whole sections of the industry these days that are devoted to such things, but he wanted a simple way to create a backup on his home or work computer of his web site that is hosted at an ISP. Some time ago I wrote a FrontPage VBA macro for another friend that could be used to automate publishing, but only from within the FrontPage application itself. Since the FrontPage application exists as a COM object, I theorized that I could rewrite the code from the macro into a Windows Script Host (WSH) application that should do the trick. The code that you see below is the results of my little 'experiment'.

Usage Notes:

Once you have taken the above items into account, copy & paste the script code into Notepad and save it to your computer with a "*.vbs" file extension. To execute the code, just double-click the script. The script will pop-up a message box when it has finished publishing a copy of the web site to your computer.

Option Explicit

' --------------------------------------------------
'
' Declare our constants.
'
' --------------------------------------------------

Const fpPublishAddToExistingWeb = 2
Const fpPublishCopySubwebs = 4
Const fpPublishLogInTempDir = 8
Const fpPublishCopyAllFiles = 64

' --------------------------------------------------
'
' This section defines the publishing variables.
'
' --------------------------------------------------

Dim strSourceUrl, strDestinationFolder
Dim strUsername, strPassword
Dim strBackupDate, strBackupTime

strBackupDate = Cstr(Year(Date())) & _
    Right("00" & Cstr(Month(Date())),2) & _
    Right("00" & Cstr(Day(Date())),2)
strBackupTime = Right("00" & Cstr(Hour(Time())),2) & _
    Right("00" & Cstr(Minute(Time())),2) & _
    Right("00" & Cstr(Second(Time())),2)

strSourceUrl = "https://www.example.com/"
strDestinationFolder = "c:\Backups\www.example.com\" & _
    strBackupDate & "_" & strBackupTime

strUsername = "server\administrator"
strPassword = "Password1"

' --------------------------------------------------
'
' This section checks to see if FrontPage is
' installed, and exits if it is not installed.
'
' --------------------------------------------------

' wait 10 seconds to "debounce" the server
WScript.Sleep 10000

' get a FrontPage Application object
Dim objFP: Set objFP = WScript.CreateObject("FrontPage.Application")

' exit if the object does not exist
If Err.Number = -2147352567 Then WScript.Quit

' --------------------------------------------------
'
' This section publishes the webs.
'
' --------------------------------------------------

' sanitize the publishing path
strDestinationFolder = CleanPath(strDestinationFolder)

' only continue the path can actually be created
If MakePath(strDestinationFolder) = True Then

    ' open the root web on the source
    objFP.Webs.Open strSourceUrl, strUsername, strPassword

    ' publish the root web to the destination
    objFP.ActiveWeb.Publish strDestinationFolder, _
        fpPublishAddToExistingWeb + fpPublishCopySubwebs + fpPublishCopyAllFiles + fpPublishLogInTempDir

    ' close the root web
    objFP.ActiveWeb.Close

End If

' --------------------------------------------------
'
' This section cleans up and exits.
'
' --------------------------------------------------

Set objFP = Nothing
WScript.Quit

' ----------------------------------------
'
' This function builds a path
'
' PASS: File path to construct
' RETURN: TRUE/FALSE for success/failure
'
' ----------------------------------------

Function MakePath(tmpText)
    On Error Resume Next
    Dim tx,ty,tz
    Dim tmpFSO
    Dim blnTempStatus
    Set tmpFSO = WScript.CreateObject("Scripting.FileSystemObject")
    blnTempStatus = True
    ty = Split(tmpText,"\")
    For tx = 0 To UBound(ty)
        tz = tz & ty(tx) & "\"
        If tmpFSO.FolderExists(tz) = False Then
            tmpFSO.CreateFolder(tz)
            If Err.Number <> 0 Then blnTempStatus = False
        End If
    Next
    MakePath = blnTempStatus
End Function

' ----------------------------------------
'
' This function sanitizes a path for valid characters
'
' PASS: File path to construct
' RETURN: New path
'
' ----------------------------------------

Function CleanPath(tmpText)
    On Error Resume Next
    Const tmpValid = "\.-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
    Dim tx,ty,tz
    For tx = 1 To Len(tmpText)
        ty = Mid(tmpText,tx,1)
        If (InStr(tmpValid,ty)>0) Or (tx=2 and ty=":") Then
            tz = tz & ty
        Else
            tz = tz & "_"
        End If
    Next
    CleanPath = tz
End Function

Happy coding!


Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/

Happy New Year!

30 December 2006 • by Bob • Random Thoughts

2006 is rapidly coming to a close, and the new year is almost upon us. Before I go home for the weekend I wanted to wish everyone:

Happy New Year! 

Gutes Neues Jahr!

Feliz Año Nuevo!

Bonne Année!

С Новым годом!

Determining Access Column Types for FrontPage Database Results Fields

14 December 2006 • by Bob • FrontPage

Summary

Sometimes you want to know where the database column types values are obtained when looking at the database results auto-generated code, but there is no easy way of determining that information by looking at the database results code. This is because the database column types are defined as field types in the database definition. This blog lists those definitions.


More Information

There are two different places where the column/field types will be listed:

Below is a list of the column/field types in an Access database:

Data Type Value
AutoNumber - Long Integer  3
AutoNumber - Replication ID  72
Text  202
Memo  203
Number - Byte  17
Number - Integer  2
Number - Long Integer  3
Number - Single  4
Number - Double  5
Number - Replication ID  72
Number - Decimal  131
Date/Time  135
Currency - General Number  6
Currency - Currency  6
Currency - Euro  6
Currency - Fixed  6
Currency - Standard  6
Currency - Percent  6
Currency - Scientific  6
Yes/No - True/False  11
Yes/No - Yes/No  11
Yes/No - On/Off  11
OLE Object  205
Hyperlink  203

References

For more information on database field types, see the following Microsoft KB article:

HOWTO: Determine Recordset Field Properties Using ADO

This article contains the following section of code that lists several database column/field types:

* DEFINEs for field types - provided for reference only.

#DEFINE ADEMPTY 0
#DEFINE ADTINYINT 16
#DEFINE ADSMALLINT 2
#DEFINE ADINTEGER 3
#DEFINE ADBIGINT 20
#DEFINE ADUNSIGNEDTINYINT 17
#DEFINE ADUNSIGNEDSMALLINT 18
#DEFINE ADUNSIGNEDINT 19
#DEFINE ADUNSIGNEDBIGINT 21
#DEFINE ADSINGLE 4
#DEFINE ADDOUBLE 5
#DEFINE ADCURRENCY 6
#DEFINE ADDECIMAL 14
#DEFINE ADNUMERIC 131
#DEFINE ADBOOLEAN 11
#DEFINE ADERROR 10
#DEFINE ADUSERDEFINED 132
#DEFINE ADVARIANT 12
#DEFINE ADIDISPATCH 9
#DEFINE ADIUNKNOWN 13
#DEFINE ADGUID 72
#DEFINE ADDATE 7
#DEFINE ADDBDATE 133
#DEFINE ADDBTIME 134
#DEFINE ADDBTIMESTAMP 135
#DEFINE ADBSTR 8
#DEFINE ADCHAR 129
#DEFINE ADVARCHAR 200
#DEFINE ADLONGVARCHAR 201
#DEFINE ADWCHAR 130
#DEFINE ADVARWCHAR 202
#DEFINE ADLONGVARWCHAR 203
#DEFINE ADBINARY 128
#DEFINE ADVARBINARY 204
#DEFINE ADLONGVARBINARY 205
#DEFINE ADCHAPTER 136

Day 4 of IIS at TechEd IT Forum in Barcelona

18 November 2006 • by Bob • IIS

Well, today was the last day, and the Microsoft Tech∙Ed: IT Forum 2006 in Barcelona has come to an end. I started off the day doing a presentation about using LogParser 2.2 with IIS. Matthew Boettcher took the following photo during the presentation:

Following that presentation, Matthew and I hosted a Chalk & Talk session with Paul Wright and Chad Kraykovic from microsoft.com and Sergei Anatov from the IIS product team. Matthew started off by giving a small recap of the topics that had been covered in the Connected Systems Infrastructure track at Tech∙Ed, then we opened the floor for the next hour and a half to answer any questions. We had around 20 or so people, and between the various attendees we had a great discussion.

A new question that's cropped up with customers over the past few days is whether there will be a web version for the Longhorn Core SKU. I don't have an answer on that, but I wanted to mention that it seems like a lot of customers are interested.

Here's a shot of the exhibition hall around the lunch break:

I worked at the IIS booth for the next three hours after the Chalk & Talk session, then I said my goodbyes to Matthew, Ivan, and Sergei, and my part of this conference was over.

My thanks to all the customers that dropped by and gave us such great feedback!

Day 3 of IIS at TechEd IT Forum in Barcelona

17 November 2006 • by Bob • IIS

Today was the third day at Microsoft Tech∙Ed: IT Forum 2006 in Barcelona, and customers are still asking some great questions about IIS. Today more customers mostly asked about their current IIS deployments and ways that they could make things better, but occasionally someone would ask, "So what's different about IIS 7?" That's such a great question, because there's so many new features to demo and talk about.

Isaac Roybal from Microsoft was in the booth again today, and we shared the booth with Eric Lawrence and the team representing Internet Explorer 7:

Tomorrow I'm giving a presentation on LogParser, which is one of my favorite IIS utilities.

Day 2 of IIS at TechEd IT Forum in Barcelona

16 November 2006 • by Bob • IIS

Today was the second day of Microsoft Tech∙Ed: IT Forum 2006 in Barcelona. So far everything seems to be going well, and I've had the chance to talk with some great customers. Once again, the customers that visited our booth are most concerned with Clustering/Load Balancing/Replication and IIS/PHP integration. But that being said, I had the chance to demo some great functionality for customers that dropped by.

Today I was joined by Isaac Roybal from Microsoft, who is a Product Manager in Windows Server Marketing, and we shared the booth with Eric Lawrence, who is a Program Manager for Internet Explorer:

I delivered the first of my presentations today to a crowd of 175, and my feedback scores for the presentation were about the average for the connected systems infrastructure track. The main points that attendees wanted me to do better was to not go so deep in my topics and to slow down a little. (Sigh.)

After we had finished up for the day, Sergei, Isaac, several members of the PowerShell team and I met for dinner with a couple of the guys from MySpace. Here's a shot of Sergei talking with Michael Coates, who is an evangelist on the Platform Evangelism team.

Tomorrow I don't have any presentations, so I should be hanging around the booth most of the day.

Day 1 of IIS at TechEd IT Forum in Barcelona

15 November 2006 • by Bob • IIS

Today was the first official day of the 2006 Microsoft Tech∙Ed: IT Forum in Barcelona. I caught Bob Muglia's opening keynote address, and there were some great demos: Vista, Office 2007, SharePoint 2007, etc., but the best demo from an IIS perspective was when they managed a web farm of IIS 7 servers using PowerShell. They also discussed the new FastCGI technology in IIS and how it can be used for faster PHP or other CGI technologies.

Sergei Anatov and I were joined at the IIS "Ask The Experts" booth today by Ivan Gonzalez Vilaboa, who is an IIS MVP from spain. (Thanks, Ivan!)

Based on the customers that visited our booth, here are the pressing questions that seemed to be on most everyone's mind regarding the future of IIS:

That's all for today. See you tomorrow!

Day 0 of IIS at TechEd IT Forum in Barcelona

14 November 2006 • by Bob • IIS

Today is the main registration day for the 2006 Microsoft Tech∙Ed: IT Forum in Barcelona. The show was sold out weeks ago, so there are 4,750 people scheduled to attend, and another 400 people on the waiting list. There were a few pre-conference sessions today, but the main bulk of the show starts tomorrow.

Sergei Anatov and I will be demonstrating IIS 7 and answering questions for any version of IIS at the IIS/IE booth in the "Ask The Experts" lounge, then later in the week I'll be delivering two presentations on IIS:

If you're at Tech∙Ed, feel free to drop by and say "Hi!"

Converting W3C log files to NCSA format

07 November 2006 • by Bob • IIS, LogParser

Around a year ago I wrote a blog entry titled "Converting NCSA log files to W3C format", which showed how to use the MSWC.IISLog object to convert log files in the NCSA format back to W3C format. I wrote that blog entry to make up for the fact that the CONVLOG.EXE utility only converts log files to NCSA format, which some older log analysis software packages require. So what happens if you have a bunch of log files in W3C format and you don't have a copy of CONVLOG.EXE on your computer?

This blog entry is something of a reverse direction on my previous post, and shows you how to use the MSUtil.LogQuery object to convert W3C log files to NCSA format. The MSUtil.LogQuery object is shipped with LogParser, which you can download from one of the following URLs:

Once you've downloaded and installed the LogParser package, you will need to manually register the LogParser.dll file in order to use the MSUtil.LogQuery object. Having done so, you can use the Windows Script Host (WSH) code in this blog article to convert a folder filled with W3C log files to NCSA format. 

To use this code, just copy the code into notepad, and save it with a ".vbs" file extension on your system. To run it, copy the script to a folder that contains your W3C log files, (named "ex*.log"), then double-click it.

Option Explicit
Dim objFSO
Dim objFolder
Dim objInputFile
Dim objOutputFile
Dim objLogQuery
Dim objLogRecordSet
Dim objLogRecord
Dim strInputPath
Dim strOutputPath
Dim strLogRecord
Dim strLogTemp

Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(".")

For Each objInputFile In objFolder.Files
 strInputPath = LCase(objInputFile.Name)
 If Left(strInputPath,2) = "ex" And Right(strInputPath,4) = ".log" Then
  strOutputPath = objFolder.Path & "\" & "nc" & Mid(strInputPath,3)
  strInputPath = objFolder.Path & "\" & strInputPath
  Set objLogQuery = CreateObject("MSUtil.LogQuery")
  Set objLogRecordSet = objLogQuery.Execute("SELECT * FROM " & strInputPath)
  Set objOutputFile = objFSO.CreateTextFile(strOutputPath)
  Do While Not objLogRecordSet.atEnd
  
   Set objLogRecord = objLogRecordSet.getRecord
   strLogRecord = FormatField(objLogRecord.getValue("c-ip"))
   strLogRecord = strLogRecord & " " & FormatField("")
   strLogRecord = strLogRecord & " " & FormatField(objLogRecord.getValue("cs-username"))
   strLogTemp = BuildDateTime(objLogRecord.getValue("date"),objLogRecord.getValue("time"))
   strLogRecord = strLogRecord & " " & FormatField(strLogTemp)
   strLogRecord = strLogRecord & " """ & FormatField(objLogRecord.getValue("cs-method"))
   strLogRecord = strLogRecord & " " & FormatField(objLogRecord.getValue("cs-uri-stem"))
   strLogTemp = FormatField(objLogRecord.getValue("cs-version"))
   If strLogTemp = "-" Then
    strLogRecord = strLogRecord & " HTTP/1.0"""
   Else
    strLogRecord = strLogRecord & " " & strLogTemp & """"
   End If   
   strLogRecord = strLogRecord & " " & FormatField(objLogRecord.getValue("sc-status"))
   strLogRecord = strLogRecord & " " & FormatField(objLogRecord.getValue("sc-bytes"))
    objOutputFile.WriteLine strLogRecord
   objLogRecordSet.moveNext
  Loop
  
  Set objLogQuery = Nothing
  objOutputFile.Close
 
 End If
Next

Function FormatField(tmpField)
 On Error Resume Next
 FormatField = "-"
 If Len(tmpField) > 0 Then FormatField = Trim(tmpField)
End Function

Function BuildDateTime(tmpDate,tmpTime)
 On Error Resume Next
 BuildDateTime = "[" & _
  Right("0" & Day(tmpDate),2) & "/" & _
  Left(MonthName(Month(tmpDate)),3) & "/" & _
  Year(tmpDate) & ":" & _
  Right("0" & Hour(tmpTime),2) & ":" & _
  Right("0" & Minute(tmpTime),2) & ":" & _
  Right("0" & Second(tmpTime),2) & _
  " +0000]"
End Function

I hope this helps!

Blog Navigation

You are on page 67 of 70 pages.

1 ... 63 64 65 66 67 68 69 70