在客户端位置注册ActiveX dll文件 [英] Register ActiveX dll files on client location

查看:80
本文介绍了在客户端位置注册ActiveX dll文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我必须通过使用vbscript
在运行时的客户端位置上安装并注册以下dll文件

DPFPDevX.dll,
DPFPEngX.dll,
DPFPShrX.dll,
DPFPDevX.dll

我是这样写的,


I have to install and register the following dll files on client location in runtime by using vbscript

DPFPDevX.dll,
DPFPEngX.dll,
DPFPShrX.dll,
DPFPDevX.dll

I write in the following way,

DIM oShell
Set oShell = CreateObject("WScript.Shell")
iReturn = oShell.Run("what i have to write here")

<object id="CaptureObj" name="CaptureObj" classid="CLSID:3FA859DA-300C-4247-BD33-6011198399C0"  codebase="http://localhost/aspnetvir/ActiveXWebsite/Activex/DPFPDevX.dll">
<param name="LPKPath"" value="Activex.lpk" />
       <object>



-当我以以下方式使用Run()方法时,它可以工作



-It works when I use Run() method in the following way

iReturn = oShell.Run("CMD /C regsvr32.exe  ""D:\New folder\ActiveXWebsite\Activex\DPFPDevX.dll""", , True)


但是我不想使用诸如D:\ Newfolder \ ActiveXWebsite ........
的硬代码.

-如何从项目根目录(http://Newfolder(localhost/aspnetvir/ActiveXWebsite)(从我的项目路径)获取子文件夹(Activex)
-如何将dll文件放在文件夹中


But I dont want to use hard code like D:\Newfolder\ActiveXWebsite.......


-How to get a sub folder(Activex) from project root (http://Newfolder(localhost/aspnetvir/ActiveXWebsite)(From my project path)
-How to put dll files in a folder

推荐答案

如果我理解正确,则需要将ActiveX DLL从服务器注册到客户端位置.
如果是这样的话,由于vbscript在客户端运行,因此您首先需要在客户端计算机上的Temp文件夹(Windows Temp文件夹)中下载DLL.将ActiveX文件下载到Temp文件夹后,可以使用以下代码获取文件夹的路径:

If I understand correctly, you need to register ActiveX DLLs from your server to client location.
If it is so, you first need to download the DLLs on client machine in Temp folder (Windows Temp folder) as the vbscript runs on client side. Once you have downloaded the ActiveX files in the Temp folder, you can use the following code to get path of folder:

Dim filesys, demofolder, createdate
Set filesys = CreateObject("Scripting.FileSystemObject")
Set demofolder = filesys.GetFolder("foldername")



希望有帮助.



Hope that helps.


这篇关于在客户端位置注册ActiveX dll文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆