Im testing my application and i want to check if i dont have .net 4.0 installed so the setup will automatic detect it and will download if needed.
In my windows 7 system its working but on my mini laptop with windows xp pro its not working.
Its detecting that i need to install it and its going to the downloading site and start to download the file wich is 48mb and after second or two i see black small window of the ms dos and small window inside with error:
16 bit ms-dos subsystem
C:..............dotnetfx.exe The NTVDM CPU has encountered an illegal instruction CS:053a IP: 02e8 OP:63 61 2d 31 31 choose close.
I tried to download a fix for it while google for a solution but it didnt work.
What could be the problem and how to fix it?
Im using inno 5 setup and im using this script for it and on windows 7 its working:
[_ISTool]<br/>
EnableISX=true
[Setup]<br/>
AppName=MyApp<br/>
AppVerName=MyApp 1.0.0<br/>
MinVersion=4.1,4.0<br/>
DefaultDirName=d:mydefdir<br/>
DefaultGroupName=MyApp<br/>
UninstallDisplayIcon={app}MyApp.exe<br/>
Compression=lzma<br/>
SolidCompression=true<br/>
OutputBaseFilename=MyAppSetup
[Files]<br/>
Source: Crogram Files (x86)ISToolisxdl.dll; Flags: dontcopy
<br/>
[Messages]<br/>
WinVersionTooLowError=MyApp requires Windows NT4, Windows 98 or later.
[Icons]<br/>
Name: {group}MyApp; Filename: {app}MyApp.exe<br/>
Name: {group}Uninstall MyApp; Filename: {uninstallexe}
In my windows 7 system its working but on my mini laptop with windows xp pro its not working.
Its detecting that i need to install it and its going to the downloading site and start to download the file wich is 48mb and after second or two i see black small window of the ms dos and small window inside with error:
16 bit ms-dos subsystem
C:..............dotnetfx.exe The NTVDM CPU has encountered an illegal instruction CS:053a IP: 02e8 OP:63 61 2d 31 31 choose close.
I tried to download a fix for it while google for a solution but it didnt work.
What could be the problem and how to fix it?
Im using inno 5 setup and im using this script for it and on windows 7 its working:
[_ISTool]<br/>
EnableISX=true
[Setup]<br/>
AppName=MyApp<br/>
AppVerName=MyApp 1.0.0<br/>
MinVersion=4.1,4.0<br/>
DefaultDirName=d:mydefdir<br/>
DefaultGroupName=MyApp<br/>
UninstallDisplayIcon={app}MyApp.exe<br/>
Compression=lzma<br/>
SolidCompression=true<br/>
OutputBaseFilename=MyAppSetup
[Files]<br/>
Source: Crogram Files (x86)ISToolisxdl.dll; Flags: dontcopy
<br/>
[Messages]<br/>
WinVersionTooLowError=MyApp requires Windows NT4, Windows 98 or later.
[Icons]<br/>
Name: {group}MyApp; Filename: {app}MyApp.exe<br/>
Name: {group}Uninstall MyApp; Filename: {uninstallexe}
Code:
<br/>
var<br/>
dotnetRedistPath: string;<br/>
downloadNeeded: boolean;<br/>
dotNetNeeded: boolean;<br/>
memoDependenciesNeeded: string;
procedure isxdl_AddFile(URL, Filename: PChar);<br/>
external mailto:isxdl_AddFile@files:isxdl.dll isxdl_AddFile@files:isxdl.dll stdcall;<br/>
function isxdl_DownloadFiles(hWnd: Integer): Integer;<br/>
external mailto:isxdl_DownloadFiles@files:isxdl.dll isxdl_DownloadFiles@files:isxdl.dll stdcall;<br/>
function isxdl_SetOption(Option, Value: PChar): Integer;<br/>
external mailto:isxdl_SetOption@files:isxdl.dll isxdl_SetOption@files:isxdl.dll stdcall;
<br/>
const<br/>
dotnetRedistURL = http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7&displaylang=en;<br/>
// local system for testing... <br/>
// dotnetRedistURL = http://192.168.1.1/dotnetfx.exe;
function InitializeSetup(): Boolean;
begin<br/>
Result := true;<br/>
dotNetNeeded := false;
// Check for required netfx installation<br/>
if (not RegKeyExists(HKLM, SOFTWAREMicrosoft.NETFrameworkv4)) then begin<br/>
dotNetNeeded := true;<br/>
if (not IsAdminLoggedOn()) then begin<br/>
MsgBox(MyApp needs the Microsoft .NET Framework to be installed by an Administrator, mbInformation, MB_OK);<br/>
Result := false;<br/>
end else begin<br/>
memoDependenciesNeeded := memoDependenciesNeeded + .NET Framework #13;<br/>
dotnetRedistPath := ExpandConstant({src}dotnetfx.exe);<br/>
if not FileExists(dotnetRedistPath) then begin<br/>
dotnetRedistPath := ExpandConstant({tmp}dotnetfx.exe);<br/>
if not FileExists(dotnetRedistPath) then begin<br/>
isxdl_AddFile(dotnetRedistURL, dotnetRedistPath);<br/>
downloadNeeded := true;<br/>
end;<br/>
end;<br/>
SetIniString(install, dotnetRedist, dotnetRedistPath, ExpandConstant({tmp}dep.ini));<br/>
end;<br/>
end;
end;
function NextButtonClick(CurPage: Integer): Boolean;<br/>
var<br/>
hWnd: Integer;<br/>
ResultCode: Integer;
begin<br/>
Result := true;
if CurPage = wpReady then begin
hWnd := StrToInt(ExpandConstant({wizardhwnd}));
// dont try to init isxdl if its not needed because it will error on < ie 3<br/>
if downloadNeeded then begin
isxdl_SetOption(label, Downloading Microsoft .NET Framework);<br/>
isxdl_SetOption(description, MyApp needs to install the Microsoft .NET Framework. Please wait while Setup is downloading extra files to your computer.);<br/>
if isxdl_DownloadFiles(hWnd) = 0 then Result := false;<br/>
end;<br/>
if (Result = true) and (dotNetNeeded = true) then begin<br/>
if Exec(ExpandConstant(dotnetRedistPath), , , SW_SHOW, ewWaitUntilTerminated, ResultCode) then begin<br/>
// handle success if necessary; ResultCode contains the exit code<br/>
if not (ResultCode = 0) then begin<br/>
Result := false;<br/>
end;<br/>
end else begin<br/>
// handle failure if necessary; ResultCode contains the error code<br/>
Result := false;<br/>
end;<br/>
end;<br/>
end;<br/>
end;
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;<br/>
var<br/>
s: string;
begin<br/>
if memoDependenciesNeeded <> then s := s + Dependencies to install: + NewLine + memoDependenciesNeeded + NewLine;<br/>
s := s + MemoDirInfo + NewLine + NewLine;
Result := s<br/>
end;
Another thing is where can i find a direct link to download the .net 4.0 exe file wich is 48mb or so? Cuz i want it to be downloaded automatic for now i could make so it will download only the installer of the .net 4.0 but i want it to download the big file.
Thanks for help.
<hr class="sig danieli
[url=http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/da48ba83-0238-47dc-aee6-3fed5cae77da]View the full article[/url]