XP机器中注册DLL的问题 [英] Problem in Register DLL in XP machine

查看:193
本文介绍了XP机器中注册DLL的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI全部,

我在批处理文件中使用下面的代码来使用regasm注册我的dll,它在Window 7中工作正常但不适用于Windows XP。

任何人都可以帮我找到解决方案,以便安装程序同时适用于XP和Window 7。安装程序适用于64位机器



HI All,
I am using below code in Batch file to register my dll using regasm, it is working fine in Window 7 but not working for window XP.
Can anybody help me in finding solution so that installer works for both XP and Window 7 both. the installer is for 64bit machine

echo on

Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0
 
REG.exe Query %RegQry% > checkOS.txt
 
Find /i "x86" < CheckOS.txt > StringCheck.txt

If %ERRORLEVEL% == 0 (

cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
regasm -u "%~dp0\WordS-A-Text.dll"
          
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
regasm  "%~dp0\WordS-A-Text.dll"

)ELSE (

cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
regasm -u "%~dp0\WordS-A-Text.dll"
          
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
regasm  "%~dp0\WordS-A-Text.dll"

)







谢谢

AP




Thanks
AP

推荐答案

您需要注意以下几点:

1)检查您正在安装的XP版本:32或64位 - 您的DLL是64位,因此无法安装在32位XP上。

2)检查XP上安装的.NET版本 - 默认情况下它没有附带任何版本d很可能它根本没有安装V4.0。

3)不要硬编码这样的路径 - 使用%WINDIR%因为不需要安装Windows在任何特定文件夹中,或者启动驱动器是C:
There are a couple of things you need to look at:
1) Check the version of XP you are installing on: 32 or 64 bit - your DLL is 64 bit, so it can''t install on a 32bit XP.
2) Check the version of .NET installed on XP - it doesn''t come with any by default, and it is quite likely that it does not have V4.0 installed at all.
3) Don''t hard code paths like that - use %WINDIR% as it is not required that Windows is installed in any particular folder, or that the boot drive is "C:"


这篇关于XP机器中注册DLL的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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