Category Archives: Tech

Add ODBC support using Astrum InstallWizard

By default, Astrum Installwizard does not support ODBC. You can do it by
adding some variables. Here is an example as following:

1. Advanced/Variables, add a variable named <odbcUserDsnDir>, with a Text
type, Get variable from Registry, Default value "C:Program FilesCommon
FilesODBCData Sources", Root key: HKLM, Path:
HKEY_LOCAL_MACHINESOFTWAREODBCODBC.INIODBC File DSN, and Value name:
DefaultDSNDir. Thereafter, you can use <odbcUserDsnDir> to get file DSN’s
location.

2. Files to install, add the target dsn file, such as notesphr.dsn in my
example, specifying the target directory as <odbcUserDsnDir>. It will make
the dsn file copy from the installation packaget to the dsn default
directory. This is my dsn file’s content:

[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=C:Program FilesPhraseMemodatabase
DBQ=C:Program FilesPhraseMemodatabasenotesphr.db

3. In the notesphr.dsn, the last two lines should be changed in reponse of
the installation directory. We can do this with the help of System
changes/Text files. Click Add…, select Replace text action, specify the
filename, which is, in this example, <odbcUserDsnDir>notesphr.dsn, Search
text "DefaultDir=C:Program FilesPhraseMemodatabase" (quote marks
excluded) by replaced with "DefaultDir=<InstallDir>database" (quote marks
excluded), click ok to dismiss the dialog. Same as just now what we did,
replace "DBQ=C:Program FilesPhraseMemodatabasenotesphr.db" with
"DBQ=<InstallDir>databasenotesphr.db"

4. done. The installation will automatically copy your dsn file to the
target computer’s appropriate directory according to the computer’s
settings.

-by tong#cngis.org

ms sharepoint portal server 2003的卸载问题

I had this issue and solved it by doing the following:
SYMPTOMS
When you use the Add/Remove Programs tool to remove SharePoint Portal Server and Windows SharePoint Services from your server, you may receive the following error message in a SPSADM.EXE – Common Language Runtime Debugging Services dialog box:
Application has generated an exception that cannot be handled.

Process id=0xb60 (2912), Thread id=0x1dc (476)

Click OK to terminate the application.
Click CANCEL to debug the application.
Additionally, you may receive the following error message in a Microsoft Office SharePoint Portal Server 2003 Setup dialog box:
Installation ended prematurely because of an error.
CAUSE
This issue occurs if you do not remove SharePoint Portal Server and Windows SharePoint Services in the correct order. This issue occurs if you remove Windows SharePoint Services before you remove SharePoint Portal Server from the server.

To fully remove SharePoint Portal Server from the server, you must remove the programs in the following order:
SharePoint Portal Server
Windows SharePoint Services
Microsoft SQL Server Desktop Engine (MSDE), if it is installed on the server
WORKAROUND
To recover a server where SharePoint Portal Server and Windows SharePoint Services are not removed in the correct order:
Log on to the server as a member of the local Administrators group.
Click Start, and then click Run.
In the Open box, type cmd, and then click OK.
Switch to the drive where SharePoint Portal Server is installed.
Type the following line, where CDimage is the path of the shared folder that contains the SharePoint Portal Server CD files, and then press ENTER:
msiexec /qb /i <CDimage>WSSSts.msi /L*v <full path>STS_Install.log LAUNCHEDFROMSETUPSTS=1

Switch to the drive where Windows is installed.
Type the following line, and then press ENTER:
cd %programfiles%Common FilesMicrosoft SharedWeb Server Extensions60Config

Type the following line, and then press ENTER:
copy Web.config Web.config.bak

Type the following line, where CDimage is the path of the shared folder that contains the SharePoint Portal Server CD files, and then press ENTER:
msiexec /qb /I <CDimage>SPSSps.msi /L*v <full path>SPS_Binary_Upgrade.log REBOOT=ReallySuppress

Type the following line, where CDimage is the path of the shared folder that contains the SharePoint Portal Server files, and then press ENTER:
msiexec /qb /famsv <CDimage>SPSSps.msi /L*v <full path>SPS_Repair.log REBOOT=ReallySuppress DONTSTARTSERVICE=1

When Setup completes and you are prompted to restart the server, click No.
Use the Add/Remove Programs tool to remove SharePoint Portal Server, Windows SharePoint Services, and MSDE (if it is installed on the server).

Important Make sure that you remove the programs in this exact order.
To avoid this issue when you remove SharePoint Portal Server from the server, use the Add/Remove Programs tool to remove the programs in the following order:
SharePoint Portal Server
Windows SharePoint Services
MSDE (if it is installed on the server)
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

sourceoffsite 安装非法字符错误

sourceOffsite在windows server 2003 sp1上安装时,当启动其服务时,提示非法字符
错误,服务不能启动。
解决方法:regedit到HKLMsystemcontrolset001servicesSosSvrSvc.net里的
imagePath里的引号去掉。
该方法已在sos KB里发布。

windows firewall & passive mode ftp

windows (sp2及2003)自带的防火墙允许配置例外,包括程序例外,和端口例外两
种。两者有区别,程序例外是允许程序打开的链接(connection)能够通过防火墙,但
防火墙外不能在程序启动前打开某一端口来连接到此程序。端口例外将开放此指定的端
口,允许防火墙内外的程序通过此端口交互。举个例子,当使用servuDeamon.exe建立
passive mode的端口为ftp,除了在程序例外中,指定servuDeamon.exe外,还要指定
2200端口例外。由于在ftp通讯前,客户端需要先行通过2200端口与服务器建立链接,
如果不指定2200例外,防火墙将阻止2200。当2200的cmd端口打开后,servuDaemon.exe
将打开新端口建立data链接,进入passive(比如servu passive端口是从
40000-40049)状态,这时程序例外必须启动。

关于swig和boost

刚听冯m讲过这两个东西,以前都不知道,孤陋寡闻了。swig可将c/c++的代码转换成如
python, tck等脚本,也可以转换成c#等代码。据说象gdal就是通过swig将原有代码转
换成.net代码的。boost是一套c++库,看起来好象有包含了很强大的功能。

win server 2003下windows程序安装不了的问题

给程老师安装biblioscape的时候(windows server 2003 enterprise edition英文系
统),发现双击安装文件,提示类似c:windowssystem32autoexec.nt. The system
file is not suitable for running MS-DOS and Microsoft Windows applications.
Choose "Close" to terminate the application. 无论半击Close还是Ignore,安装无
法进行。
以前没遇到过。后来搜索了一下c盘上的autoexec.nt,发现在repaire目录下有一
autoexec.nt,将之拷贝到c:windowssystem32以面。再双击安装,正常通过。
这应该是以前误删除autoexec.nt造成的。

sourceOffSite 4.1 并发问题

发现当有多个用户同时连接上sos server的时候,server停止反应。
解决方案:
server端
(1)确认在vss目录下的win32目录下的ssapi.dll版本号是以98.48结束
(2)将
HKEY_CLASSES_ROOTCLSID{783CD4E4-9D54-11CF-B8EE-00608CC9A71F}InprocServer3
2ThreadingModel 的值department,改为both
(3)将实时扫描的anti virus程序设置为排除sos database目录
client端
(4)客户端将最新的windows安全补丁都打上

PHP和MySQL的License问题

很有意思。事情原委如下,
MySQL的许可分两种,一种是基于GNU开源协议,一种是商用协议。前一种更具体的讲,
MySQL的数据库是基于GPL协议的,但一些client libraries是基于LGPL的。MySQL这不
在Web应用上取得了比较大的成功了,一些商用软件就连接到这些client libraries上
面(这是合法的),从而跟基于GPL的MySQL数据库核心间接连接起来。这样这些商用软
件就不用买MySQL了,损害了MySQL的利益。
所以MySQL在某一天决定将这些LGPL的库也改成GPL了,因为GPL规定使用GPL的软件也必
须以GPL的方式公开出来,这样就可以防止商用软件的上述情况了。
Linux下,有个词叫LAMP,意指LInux+Apache+MySQL+PHP是最佳组合,性能很高配置很
容易。PHP将MySQL的client库就嵌入到它的源码里。PHP从4之后改成APL,而不是GPL。
MySQL的更改库许可的决定,意味着如果PHP继续用MySQL,也必须基于GPL协议。而APL
和GPL是有冲突的。所以PHP只能将MySQL的集成模块从自己包里移出去。
这并不意味着用户不能将PHP和MySQL连在一起,对用户的使用来讲是没有问题的,基于
PHP和MySQL的开发只能基于GPL也是许可的。但对PHP来讲,使用MySQL就和使用其他数
据库,比如Oracle等没有区别了,处在一样的位置上。
类似的情况还危及到MySQL与RedHat等多家开源软件的关系。所以MySQL出于利益的考
虑,在04年又决定给出一个exception,即在得到他们授权的情况下,开源软件是可以
将这些client库集成起来,而不用担心GPL的限制。但PHP 5推出了SQLite,仍没有将
MySQL重新集成起来。
因为PHP是纯免费的东西,PHP公司据亮子讲,也是只买附加产品的,所以他们的分离对
PHP的利益影响不大,而对MySQL,因为它还靠它的商业License挣钱呢,跟PHP分离,对
它的影响就比较大。所以有这种举动,也可以理解。
跟亮子在讨论它们间的License关系,找了几个中文的报道看,都不大正确(中国记者
的水平由此可见,都在乱写一通),而英文的报道相对较少。将英文报道跟英文论坛上
讨论的问题综合起来,写了这个东西,应该是正确的。

远程桌面连接

在连接到503 server时,发现远程无法登录,已经超过最大用户限制。由于503没有带
显示器,只有重启。
503配置了windows 2003 server,2k3除本地外控制台外,只支持2个远程登陆会话。一
般在使用后的时候,就点叉叉关掉远程控制程序,这时连接进入断开状态,但还一直保
留着该会话。应该注销出来才对。
看了一下相关的资料,从组策略(gpedit.msc)里配置了终端服务的断开连接会话在5分
钟后自动注销。这样就好一些了。否则会造成今天这样管理员也登陆不进去的情况。