Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2007
    Posts
    7

    .NET 3.0 Dependency makes my installer too large (50MB) are there any alternatives?

    Hello,

    I require .NET 3.0 to be installed on the machine, so I added the .NET 3.0 dependency to my installer. The resulting exe is 50MB large. I think it is too large. Is there another approach I can use that will result in a smaller exe.

    Thanks,
    Rilwan.

  2. #2
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    Hello,

    you could use the dependency module to check if .NET is not installed, and then download the installer from your own web server to a temporary location. Once downloaded, run the installer, delete it, then resume the setup of your product.

    Ulrich

  3. #3
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    If I recall correctly, .NET 3.0 was a web installation, So can't you just pack the End User package?

  4. #4
    Join Date
    Aug 2007
    Posts
    7

    How do I exit the installation if the user does not have .NET 3.0 installed.

    Hello,

    I will rather check for .NET 3.0 and exit the installation if the user does not have it and display a message to the user asking the user to go install it.

    How do I check for .NET 3.0 with script code?
    How do I display a message to the user right before I exit the installation, if the user does not have .NET 3.0 installed. I will like to display a link to the download page for .NET 3.0 redistributable.

    Thanks.

  5. #5
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Here's some code out of my tool kit

    Code:
    function GetDotNetVer()
      -- determine DotNet version()
      -- by jAssing (IR forums or josh@jAssing.com)
    
      local cDotVer = "";
    
      if Registry64.DoesKeyExist(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\.NETFramework","InstallRoot") then
        local cPath = Registry64.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\.NETFramework", "InstallRoot", false);
    
        -- This next line is needed for 64bit OS's -- just to make the rest of the code "work"
        cPath = String.Transform( cPath, "framwork64", "Framework", false);
    
    	  if cPath ~= nil and Folder.DoesExist( cPath ) then
    	    local tDotNetFolders = Folder.Find(cPath, "v*.*", false, nil);
    	    if tDotNetFolders ~= nil then
    	      Table.Sort(tDotNetFolders,nil);
    
    	      if File.DoesExist( tDotNetFolders[ Table.Count(tDotNetFolders) ].."\\mscorwks.dll" ) then
    	        --1.1 or later
    	        cDotVer = File.GetVersionInfo( tDotNetFolders[ Table.Count(tDotNetFolders) ].."\\mscorwks.dll" ).FileVersion;
    	      elseif File.DoesExist( tDotNetFolders[ Table.Count(tDotNetFolders) ].."\\mscormmc.dll" ) then
    	        -- 1.0
    	        cDotVer = File.GetVersionInfo( tDotNetFolders[ Table.Count(tDotNetFolders) ].."\\mscormmc.dll" ).FileVersion;
    	      elseif File.DoesExist( tDotNetFolders[ Table.Count(tDotNetFolders) ] .. "\\Windows Communication Foundation\\SMDiagnostics.dll")  then
    	        -- 2.0
    	      	cDotVer = File.GetVersionInfo( tDotNetFolders[ Table.Count(tDotNetFolders) ] .. "\\Windows Communication Foundation\\SMDiagnostics.dll").FileVersion;
    				elseif File.DoesExist( tDotNetFolders[ Table.Count(tDotNetFolders) ] .. "\\csc.exe") then
    				  -- 3.5
    				  cDotVer = File.GetVersionInfo( tDotNetFolders[ Table.Count(tDotNetFolders) ] .. "\\csc.exe").FileVersion;
    	      else
    	        SetupData.WriteToLogFile("INFO\tNo files found in", tDotNetFolders[ Table.Count(tDotNetFolders) ]);
    	      end
    	    end
    	  end
      end
    	-- SetupData.WriteToLogFile("INFO\t.net version determined "..cDotVer.."\r\n",true);
    
      return cDotVer;
    end
    That will tell you what version it detected (only works to 3.5...)

    Then in your OnStartup, just issue a Dialog.Message() if you don't detect the proper version.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  6. #6
    Join Date
    Aug 2007
    Posts
    7

    Thank you for the code snippet.

    Thanks a lot.

  7. #7
    Join Date
    Aug 2007
    Posts
    7

    Please post a version of the code that does not use Registry64 and String.Transform

    Hello,

    When I integrated the code you provided, I discovered that Registry64 and String.Transform was not available in my SetUp Factory 8.0 installation. I modified the script to work as shown below:

    Code:
    function GetDotNetVer()
      -- determine DotNet version()
      -- by jAssing (IR forums or josh@jAssing.com)
    
      local cDotVer = "";
    
      if Registry.DoesKeyExist(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\.NETFramework","InstallRoot") then
        local cPath = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\.NETFramework", "InstallRoot", false);
        
    	  if cPath ~= nil and Folder.DoesExist( cPath ) then
    	    local tDotNetFolders = Folder.Find(cPath, "v*.*", false, nil);
    	    if tDotNetFolders ~= nil then
    	      Table.Sort(tDotNetFolders,nil);
    
    	      if File.DoesExist( tDotNetFolders[ Table.Count(tDotNetFolders) ].."\\mscorwks.dll" ) then
    	        --1.1 or later
    	        cDotVer = File.GetVersionInfo( tDotNetFolders[ Table.Count(tDotNetFolders) ].."\\mscorwks.dll" ).FileVersion;
    	      elseif File.DoesExist( tDotNetFolders[ Table.Count(tDotNetFolders) ].."\\mscormmc.dll" ) then
    	        -- 1.0
    	        cDotVer = File.GetVersionInfo( tDotNetFolders[ Table.Count(tDotNetFolders) ].."\\mscormmc.dll" ).FileVersion;
    	      elseif File.DoesExist( tDotNetFolders[ Table.Count(tDotNetFolders) ] .. "\\Windows Communication Foundation\\SMDiagnostics.dll")  then
    	        -- 2.0
    	      	cDotVer = File.GetVersionInfo( tDotNetFolders[ Table.Count(tDotNetFolders) ] .. "\\Windows Communication Foundation\\SMDiagnostics.dll").FileVersion;
    				elseif File.DoesExist( tDotNetFolders[ Table.Count(tDotNetFolders) ] .. "\\csc.exe") then
    				  -- 3.5
    				  cDotVer = File.GetVersionInfo( tDotNetFolders[ Table.Count(tDotNetFolders) ] .. "\\csc.exe").FileVersion;
    	      else
    	        SetupData.WriteToLogFile("INFO\tNo files found in", tDotNetFolders[ Table.Count(tDotNetFolders) ]);
    	      end
    	    end
    	  end
      end
    	-- SetupData.WriteToLogFile("INFO\t.net version determined "..cDotVer.."\r\n",true);
      
      return cDotVer;
    end
    
    
    local DotNetVersion = GetDotNetVer();
    if DotNetVersion == nil then 
       DotNetVersion = "1.0"
    end 
    
    --Dialog.Message("Notice", DotNetVersion, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    local result2 = String.Left(DotNetVersion, 3);
    
    --Dialog.Message("Notice", result2, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    local result = String.ToNumber(result2);
    
    --Dialog.Message("Notice", result, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    if result < 3.5 then 
      result = Dialog.Message("Installation requirement is missing", " Microsoft .NET Framework 3.5 must be installed before Related Products Slideshow Builder is installed. Microsoft .NET 3.5 Framework download can be downloaded for free at http://www.microsoft.com/downloads/en/default.aspx", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
      Application.Exit(0);
    end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts