i=pos(ls_temp,"\")
do while i>0
ls_drivepath=ls_drivepath+left(ls_temp,i)
ls_temp=right(ls_temp,len(ls_temp)-i)
i=pos(ls_temp,"\")
loop
li_rtn=RegistrySet(ls_sys[4], "Start" , RegString!, ls_drivepath+ls_source[8])
IF li_rtn = -1 THEN
messagebox("错误","读取系统文件或写注册表出错 !",information!,ok!)
RETURN
END IF
li_rtn=RegistrySet(ls_sys[4], "UID" , RegString!, ls_source[9])
IF li_rtn = -1 THEN
messagebox("错误","读取系统文件或写注册表出错 !",information!,ok!)
RETURN
END IF
regedit.ini文件格式如下:
[INI]
AutoStop=yes
DatabaseFile=Psdemodb.db
DatabaseName=仓储管理系统
Description=cl
Driver=
PWD=sql
Start=dbeng50.exe
UID=dba
备注:
程序中ls_sys[2]变量代表的注册表键值是我通过安装程序制作工具自动生成的,每个人使用的制作安装程序的工具不同,这个键值也许不尽相同。其实用意只是在于取得st_path这个变量,它保存应用程序安装后所在路径,其实也可以用API函数得到,至于使用API函数怎么取得当前程序所在路径就不讲了。 上一页 [1] [2] [3]
|