Click here to Skip to main content
12,395,117 members (65,117 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
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 13-Jan-13 18:13pm
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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 14 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100