inscription de OCX et de DLL
Salut à tous
Pouvez-vous me donner une solution en vbscript pour enregistrer une ActiveX?
Voici le code que j'ai fais; mais la ligne bleu que j'ai pris dans VBA ne marche pas:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Option Explicit
Dim IE
Dim doc
Dim oFSO
Dim sSrcPath
Dim sDestPath
Dim oFold
Dim sProjectName
verification("\wiaaut.dll")
verification("\COMDLG32.OCX")
'si les dll et ocx sont là
'inscrit les dll et ocx
'sinon
'copie
'inscrit les dll et ocx
'fin si
function verification (filedllocx)
Set oFSO = CreateObject("Scripting.FileSystemObject")
'0=windows 1=windows\system32
if not ofso.FileExists(oFSO.GetSpecialFolder(1).path & filedllocx ) then
ofso.CopyFile oFSO.GetParentFolderName(Wscript.ScriptFullName) & filedllocx, oFSO.GetSpecialFolder(1).path & filedllocx
Shell "regsvr32 -s """ & oFSO.GetSpecialFolder(1).path & filedllocx & ""
end if
end function |
Merci à tous