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

)



Thanks
AP
Posted
Updated 13-Jan-13 21:35pm
v3
Comments
deostroll 14-Jan-13 2:55am    
Checked for what processor architecture that dll was built for? 32 bit or 64 bit?
Member 4531085 14-Jan-13 3:35am    
it is for 64 bit

1 solution

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:"
 
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