|
主题: 请教:关于用fileio获知用户插件安装情况
|
 tony3066
职务:普通成员
等级:1
金币:0.0
发贴:58
注册:2001/10/14 18:25:18
|
#12001/10/22 11:25:58
我在divx插件安装程序中添加了一个divx.txt文件,想利用它获得用户是否已经安装该插件的信息. 即: 用户运行时,首先寻找此文件, 如已安装(既有该文件),则继续放映,否则安装. 我知道用fileio可以实现 但具体代码却不知如何写,请高手给以详细指教.
|
 草原风
职务:版主
等级:5
金币:13.0
发贴:3489
注册:2001/2/17 19:47:06
|
#22001/10/22 14:15:18
fileName object me -- return fileName string of the open file status object me -- return the error code of the last method called error object me, int error -- return the error string of the error setFilterMask object me, string mask -- set the filter mask for dialogs openFile object me, string fileName, int mode -- opens named file. valid modes: 0=r/w 1=r 2=w closeFile object me -- close the file displayOpen object me -- displays an open dialog and returns the selected fileName to lingo displaySave object me, string title, string defaultFileName -- displays save dialog and returns selected fileName to lingo createFile object me, string fileName -- creates a new file called fileName setPosition object me, int position -- set the file position getPosition object me -- get the file position getLength object me -- get the length of the open file writeChar object me, string theChar -- write a single character (by ASCII code) to the file writeString object me, string theString -- write a null-terminated string to the file readChar object me -- read the next character of the file and return it as an ASCII code value readLine object me -- read the next line of the file (including the next RETURN) and return as a string readFile object me -- read from current position to EOF and return as a string readWord object me -- read the next word of the file and return it as a string readToken object me, string skip, string break -- read the next token and return it as a string getFinderInfo object me -- get the finder info for the open file (Mac Only) setFinderInfo object me, string attributes -- set the finder info for the open file (Mac Only) delete object me -- deletes the open file + version xtraRef -- display fileIO version and build information in the message window * getOSDirectory -- returns the full path to the Mac System Folder or Windows Directory "
|
 愁眉不展
职务:普通成员
等级:1
金币:0.0
发贴:114
注册:2000/12/21 16:27:18
|
#32001/10/22 17:27:48
判断文件是否存在应该用filextra呀!
|
 koala_5d
职务:普通成员
等级:2
金币:1.0
发贴:189
注册:2000/12/25 19:27:07
|
#42001/10/22 18:00:49
你这样会有个问题呀。 如果用户自己安装过呢? 这样不会有你的divx.txt文件的。那么你的判断有什么用呢? 看看通过其他的方法检测! 比如用ActivexX 来做。 我没有做过,但是觉得应该可以的。
|
 飞雪劫
职务:普通成员
等级:1
金币:0.0
发贴:4
注册:2001/10/22 21:33:34
|
#52001/10/22 21:56:38
可不可以查找注册表呢?
|
 threem
职务:普通成员
等级:2
金币:1.0
发贴:338
注册:2001/6/14 13:52:15
|
#62001/10/22 23:40:28
divx是什么插件?
他的安装在注册表中注册键直吗? 如果是!就利用bud api来检测相关的键直!以此了解这个茶碱的安装!
你可以利用相关软件(具体不详)监视这个茶碱的安装过程,看他在注册中的改动!
|
 skylen
职务:普通成员
等级:1
金币:0.0
发贴:93
注册:2001/10/20 21:42:17
|
#72001/10/25 17:10:26
这个问题也是我现在工作中要做的工作。希望大家继续讨论找个好的方法出来。
divx安装后。会形成如下文件。
windows安装目录----inf | |____OpenDivX.inf | |____system32 |_DivX.dll |_DivXc32.dll |_DivXc32f.dll |_DivXdec.ax |_DivX_c32.ax
但是这样会出现一个问题就是:也许用户安装的windows在其它的逻辑区上。或是名称不是“WINDOWS”, 而且windows 2000用户的安装目录是"WINNT"这对检测也许会造成麻烦。
另:如果要检测注册表的话,可以到这里。HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DIVXCodec
其它人知道应该怎么写吗?还有没有更好的办法?
|