Archive for October, 2008


using fckeditor in BlogEngine.NET

here is what i did to make it work. I provide all steps to have a complete documentation.
“Webroot” is the directory where you installed blogengine.net in. You should change the web.config
in the last step, because you have to restart your application anyway.

  • Download the FCKEditor main package at http://www.fckeditor.net/download.
    • Extract the zip file to your webroot. You now have a folder fckeditor in your webroot.
  • Download the FCKEditor.NET package at http://www.fckeditor.net/download.
    • Extract the zip file to a temporary folder.
    • Copy FredCK.FCKeditorV2.dll from {temporary folder}\bin\Release\2.0\ to the \bin\ directory of your webroot.
  • Create a folder “userfiles” in your webroot. Add write permissions to this folder for the Network Service account (Windows Server 2003).
  • Switch off HTTP compression in the blog settings
  • add_entry.aspx ({webroot}\admin\Pages\):
    • add <%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="fck" %>
    • replace with
    • remove upload fields (txtUploadImage, txtUploadFile)
  • add_entry.aspx.cs ({webroot}\admin\Pages\):
    • replace txtContent.Text with txtContent.Value
    • remove all references to the old upload fields (txtUploadImage, txtUploadFile)
    • the function SizeFormat() can also be removed
  • fckconfig.js ({webroot}\fckeditor\):
    • set _FileBrowserLanguage to 'aspx'
    • set _QuickUploadLanguage to 'aspx'
  • config.ascx ({webroot}\fckeditor\editor\filemanager\connectors\aspx\):
    • you have to implement a session check in CheckAuthentication() or just return true (not recommended)
  • Set enableSessionState=”true” in the section in web.config

Can someone give me a hint how to implement the session check in the CheckAuthentication() method?

Installing Windows XP Ntbackup on Windows Vista

In order to install the Windows XP Ntbackup program on your Windows Vista computer you will need to following files from a Windows XP computer:

Ntbackup.exe
Ntmsapi.dll
Vssapi.dll

These can be found in the C:\Windows\System32 folder of Windows XP.

You could also copy these help files, but you don't really need them:
Ntbackup.chm
Ntbackup.hlp

These can be found in the C:\Windows\Help folder of Windows XP.

Copy all 3 (or 5) files to a folder in your Vista Program Files folder, for example use C:\Program Files\Ntbackup. Since you won't be pasting these files in the system path there is no need to worry about overwriting files.

Next, you will need to turn on or install the Removable Storage Management feature (you will get an NTSMAPI.dll error if Removable Storage Management is not enabled).

To turn on Removable Storage Management in Windows Vista:

  1. Click the Start button > Control Panel > Programs, and then click Turn Windows Features on or off. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

MacBook Air安装Windows图解

MacBook笔记本同样牵手Windows

Using INF Files to Edit the Windows Registry

One way to edit the Windows Registry is with a special file type with the extension INF. Its construction and use is described.

Background and Introduction to INF Files

INF (Information) files have been around for a long time. They are text files with the file extension


[Tutorial] INF Part-4 “RenFiles”, Rename Files

RenFiles

[Rename-files-section-name]
new-file-name, old-file-name

QUOTE
Lists the names of files to be renamed. The name of the section must appear in a Renfiles item in an Install section of the INF file.

new-file-name
New name of the file.

old-file-name
Old name of the file.

This example renames the files

[Tutorial] INF Part-3 “CopyFiles”, How to Copy Files

CopyFiles

[install-section-name]
CopyFiles=file-list-section

[file-list-section]
destination-file1-name(, source-file1-name)(, temporary-file1-name)(,flag)
destination-file2-name(, source-file2-name)(, temporary-file2-name)(,flag)

A list of the names of files to be copied from a source disk to a destination directory. The source disk and destination directory associated with each file are specified in other sections of the INF file. The file-list-section name must appear in the

[Tutorial] INF Part-2 “[Strings]“, “How to” use %STRINGS%

[Strings]

The “Strings” section is generally the last section in the INF file, a string key defined in this section may be used anywhere in the INF file that the corresponding string would be used. Using a strings key requires that it be enclosed in percent signs (%)

CODE
[Strings]
strings-key=value
QUOTE
strings-key
A unique name consisting of letters and digits.

value
A string consisting of letters, digits, or other printable characters. It should be enclosed in double-quotation marks if the corresponding strings key is used in a type of item that requires double quotation marks.

The Strings section makes translation of strings for international markets easier by placing all strings that can be displayed at the user interface when the INF file is used in a single section of the INF file. Strings keys should be used whenever possible.

Here is an example of what Strings are used for

Somewhere in the INF file you may find something like

[Version]

The Version section is at the beginning of every INF file (all INF files must have this section.) It determines what Platforms or Operating Systems the files can be installed on.

For Windows NT-based operating systems (NT, 2000, XP)

CODE
[Version]
Signature=”$Windows NT$”

For Windows 9x (95, 98, ME)

CODE
[Version]
Signature=”$Windows 95$”

For

制作好程序之后,有很多作者都习惯用专业软件来给程序添加一个安装程序包。其实微软的2000和XP系统已经自带了一个小巧的制作安装软件iexpress,大小只有112KB,,存放在\Windows\System32中。由于是微软自带的程序,所以制作的安装软件具有更好的兼容性。下面笔者就简单介绍该软件的使用方法,希望用这款软件来制作一个比较专业的安装程序包。

iexpress的使用方法很简单,只需在运行中输入iexpress就可以。虽然iexpress是一款英文软件,不过制作安装程序包采用的是向导式,操作起来不算很难。在开始的时候有两个选项,一个是创建新的自解压指导文件,另一个是打开已经保存的自解压指导文件,这里我们选择第一个,然后点击下一步(图1)。接下来选择制作安装程序包的三种方式,分别是解压并运行安装、只解压并不运行安装和只压缩(图2),根据自己的实际情况来进行选择。然后我们输入安装软件的名称,这里可以是英文,也可以是汉字。下面设置软件在安装前是否提示用户确认,通常情况选择不提示。

  接下来添加“用户允许协议”,软件在使用过程当中有什么注意事项和要求都可以写到“用户允许协议”当中,只有用户都同意上面的条件才能正常继续安装(图3)。然后在下面添加要制作安装的软件,建立文件列表,并且还要指定安装过程中运行的程序和相应的命令(图4)。接下来选择软件在安装过程中的显示模式,分别是默认、隐藏、最大和最小(图5)。


Powered by WordPress | Theme: Motion by 85ideas.