Click here to Skip to main content
15,909,193 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hi,
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>


-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)

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
Posted
Updated 1-Mar-11 3:03am
v2

1 solution

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:

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


Hope that helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900