-
����λ�ã���ҳ����ҳ�����ASPʵ���� ��ASPҳ����ע��DLL��VBScript CLASS
-
��ASPҳ����ע��DLL��VBScript CLASS
ʱ�䣺2004/11/7 3:01:00��Դ����վ�������ߣ�������Ҫ����(0)
-
-----------------------------------------------ROOT1---------------------------------------
*******************************************************************************************
*ʹ�ñ�CLASS���Թ�����ASPҳ����ע�����DLL
*��CLASS��WIN 2K�ϲ���ͨ��
*ע��ʹ�ñ�CLASS��Ҫ�Ƚ���һ��XML�ļ����ļ�����.���±�������3�д�Ϊ*.XML�ļ�
*
*
*
*
*
*------------------------------------------------------------------------------------------
*������
* dim objRegsvr32
* set objRegsvr32 = new Regsvr32
* with objRegsvr32
* if .LoadXml("../MyDll.xml") then
* call Response.Write("XML�ļ����ش���")
* set objRegsvr32 = nothing
* Response.End
* end if
* select case .AddNode("F:\web\cw31072\dll\test\MyClass.dll" , true) '�������Ŀ��ע��DLL
* case 1
* call Response.Write("��Ŀ�Ѿ���ӽ�XML�ļ������ɹ�ע��DLL����")
* case 0
* call Response.Write("��Ŀ�Ѿ���ӽ�XML�ļ�����ע��DLLʱʧ�ܣ�")
* case -1
* call Response.Write("XML�ļ����Ѿ��и���Ŀ����DLLҲ�Ѿ�ע����ˣ�")
* end select
* ..........................
* end with
*
* '��CLASS�dz������滹��Щ�������ҾͲ�������,������֪���ˡ��պ�����Դ�
* '��XML�ļ���������ע����ʹ�ע���DLL�б�
* 'XML�ļ���ÿ����Ŀ���£�
F:\web\cw31072\dll\test\MyClass.dll
* 'F:\web\cw31072\dll\test\MyClass.dll������DLL�ļ���·��
* '�Ƿ��Ѿ�ע��="1"���Ǹ�DLL�Ѿ�ע�����=��0�����ǻ�û��ע���أ�
*******************************************************************************************
Class Regsvr32
private s_objXml
private s_objNodeRoot
private s_strXmlPath
private s_strAttributeName
'------------------------------------
'Ŀ�ģ� ����DLL����xml�ļ�
'������ XML�ļ���ַ
'���أ� ����ʧ�ܾͷ���TRUE
'------------------------------------
public function LoadXml(strPath)
set s_objXml = CreateObject("MSXML2.DOMdocument")
s_objXml.async = false
s_objXml.load(strPath)
if s_objXml.parseError.errorCode <> 0 then
set s_objXml = nothing
LoadXml = true
exit function
end if
set s_objNodeRoot = s_objXml.documentElement
s_strXmlPath = strPath
s_strAttributeName = "�Ƿ��Ѿ�ע��"
end function
'---------------------------------------------
'Ŀ�ģ� ���һ��DLL��Ŀ
'������ strPath: DLL�ļ���ַ
' blnReg: ��Ӻ��Ƿ���ע��
'���أ� ���Ҫ����Ӻ�ע�ᣬע��ɹ��ͷ���1,ע��ʧ�ܷ���0,�Ѿ��и���Ŀ��ע����ͷ���-1
'---------------------------------------------
public function AddNode(strPath , blnReg)
dim objNewNode
dim strStart
dim objNode
strStart = "0"
set objNode = SelectNode(strPath)
if objNode is nothing then
if Reg(strPath , true) then
strStart = "1"
AddNode = true
else
AddNode = false
end if
set objNewNode = s_objXml.createElement("Dll")
call objNewNode.setAttribute(s_strAttributeName , strStart)
objNewNode.Text = strPath
call s_objNodeRoot.appendChild(objNewNode)
call s_objXml.save(s_strXmlPath)
else
if blnReg then
if objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = "1" then
AddNode = true
else
if Reg(strPath , true) then
objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = "1"
call s_objXml.save(s_strXmlPath)
else
AddNode = false
end if
end if
else
AddNode = false
end if
end if
end function
'----------------------------------------
'Ŀ�ģ� ɾ�������Ѿ�ע�ᣬ����ûע��Ľڵ�
'������ blnStart: 0=δע���,1=�Ѿ�ע���
'���أ� ִ����ɾ�������ͷ���TRUE������FALSE
'----------------------------------------
public function ReAllNode(byVal blnStart)
dim objNode
dim blnIsChange
blnStart = CStr(blnStart)
for each objNode in s_objNodeRoot.childNodes
if objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = blnStart then
call s_objNodeRoot.removeChild(objNode)
blnIsChange = true
end if
next
if blnIsChange then
ReAllNode = true
call s_objXml.save(s_strXmlPath)
else
ReAllNode = false
end if
end function
'-----------------------------------------
'Ŀ�ģ� ɾ��ijһ���ڵ�
'������ �ڵ�����
'���أ� �Ҳ����ڵ�ͷ���TRUE
'-----------------------------------------
public function ReNode(strPath)
dim objNode
set objNode = SelectNode(strPath)
if objNode is nothing then
ReNode = true
else
call s_objNodeRoot.removeChild(objNode)
call s_objXml.save(s_strXmlPath)
end if
end function
'-----------------------------------------
'Ŀ�ģ� Ѱ��ij���ڵ�
'������ strPath: �ڵ�����
'���أ� �ҵ��ͷ��ظýڵ㣬�Ҳ����ͷ���nothing
'-----------------------------------------
private function SelectNode(ByVal strPath)
dim objNode
strPath = UCase(strPath)
for each objNode in s_objNodeRoot.childNodes
if UCase(objNode.childNodes.item(0).nodeValue) = strPath then
Set SelectNode = objNode
exit function
end if
next
set SelectNode = nothing
end function
'--------------------------------------------
'Ŀ�ģ� �鿴DLL�ļ��б���ij���ļ�ע��״̬
'������ ������
'���أ� 1=�Ѿ�ע��
' 0=δע��
' -1=�Ҳ������ļ�
'--------------------------------------------
public function CheckDll(strPath)
dim objNode
set objNode = SelectNode(strPath)
if objNode is nothing then
CheckDll = -1
else
CheckDll = Cint(objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue)
end if
end function
'--------------------------------------
'Ŀ�ģ� ������δע���DLLע��
'���أ� �����ij��DLLע��ʧ�ܾͷ���TRUE
'--------------------------------------
public function RegAllNode()
dim objNode
for each objNode in s_objNodeRoot.childNodes
if objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = "0" then
if Reg(objNode.childNodes.item(0).nodeValue , true) then
objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = 1
else
RegAllNode = true
end if
end if
next
end function
'-----------------------------------------
'Ŀ�ģ� ע��DLL
'������ strPath: Ҫע��Dll�ļ�·��
' blnLoding: �Ƿ�ȴ�ע����ɲż���ִ�г���
'���أ� ���blnLoging=TRUE,ע��ɹ��ͷ���True
'-----------------------------------------
private function Reg(strPath , blnLoding)
dim objShell
set objShell = CreateObject("Wscript.Shell")
if objShell.Run("regsvr32.exe /s " & strPath , , blnLoding) = 0 then
Reg = true
end if
set objShell = nothing
end function
End Class
����Ķ�Mac����Windows�����ļ���Windows 7����ϵͳ��֤����windows 8.1ϵͳ�汾�Ų鿴����Windows 8.1ϵͳ�绰����ʱ���������ش���������Windows 8��ε�����Ļ�ֱ���windows8.1����ռ��100%�������Mac˫ϵͳ���ɾ��Boot Camp��װ��Windows����Apple���������Mac ������ Windows
-
��������û�в�ѯ���κμ�¼��
��������
Ѹ��������ȫ�����ֲ�asp����javascript�ϴ�ͼƬ���Ƹ�ʽ��С�������ߴ����ҳ��������Ӧ���ܽ�ASP�����������ʹ�ȫasp������������ͽ���취
�����������ǵ���visual studio ʵʱ������ ���ֽ��SQLSERVER�洢���̼��������Asp��ȡ��ʵIP��ַASP������Mssql�ļ��ַ���һ�����õ�UBB�༭��(������)�����Split���ַ���ת��Ϊ���鲢��ȡ������ASP��ֹ���ظ��ύ�İ취��������ѵļ�������Դ����
�鿴����0������>>