Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6189027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:20:17+00:00 2026-05-24T02:20:17+00:00

I can’t find any example, so I’m not sure if that is possible. What

  • 0

I can’t find any example, so I’m not sure if that is possible. What I want to do is:

I want to install .NET C# windows service with database. So my requirements will be .NET Framework and SQL Server 2008 on the clients machine.

So, it has to look like that:

  1. check if there is .NET Framework 4.0 and SQL Server 2008
  2. If cant find SQL Server – than ask client to choose the path or leave.
  3. Eventually install .NET Framework 4.0
  4. Log into SQL Server, and (from script) create tables, procs etc..
  5. Install wnd service from cmd line. In this point I also have to setup the connectionstring in my app.config – is that possible?)

I want to do that in Inno setup. Is that possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:20:18+00:00Added an answer on May 24, 2026 at 2:20 am

    Well, I can help with 1 and 3.

    To check for the .NET framework, you can use the following method (which will also install the .NET framework, if needed). I currently use it to check for .NET 2.0, but you can just change the version it looks for to check for 4.0.

    [Files]
    Source: Files\dotnetfx.exe; DestDir: {tmp}; Flags: ignoreversion; Check: NeedsFramework
    
    [Run]
    Filename: {tmp}\dotnetfx.exe; Parameters: "/q:a /c:""install /l /q"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: Installing .NET Framework if needed. This may take several minutes.
    
    [Code]
    
    // .NET install helpers
    
    // Indicates whether .NET Framework 2.0 is installed.
    function IsDotNET20Detected(): boolean;
    var
        success: boolean;
        install: cardinal;
    begin
        success := RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', 'Install', install);
        Result := success and (install = 1);
    end;
    
    //RETURNS OPPOSITE OF IsDotNet20Detected FUNCTION
    //Remember this method from the Files section above
    function NeedsFramework(): Boolean;
    begin
      Result := (IsDotNET20Detected = false);
    end;
    
    //IF SETUP FINISHES WITH EXIT CODE OF 0, MEANING ALL WENT WELL
    //THEN CHECK FOR THE PRESENCE OF THE REGISTRY FLAG TO INDICATE THE
    //.NET FRAMEWORK WAS INSTALLED CORRECTLY
    //IT CAN FAIL WHEN CUST DOESN'T HAVE CORRECT WINDOWS INSTALLER VERSION
    function GetCustomSetupExitCode(): Integer;
    begin
      if (IsDotNET20Detected = false) then
        begin
          MsgBox('.NET Framework was NOT installed successfully!',mbError, MB_OK);
          result := -1
        end
    end;
    

    Note that this solution was derived from this article. You can download dotnetfx for .NET 4.0 from the microsoft website.

    As for step 4, I would suggest that you create a tool/script which gets installed on the user’s machine, which you then call from the Run section as needed.

    Step 2 is going to be tricky, but apparently not impossible. After some reading it appears as though you can add custom UI pages to InnoSetup. See the help here for the method. How much work you can do in the actual UI page I’m not sure.

    It’s worth noting that using the Pascal scripting in InnoSetup you more or less have complete access to Win32 functions, plus the ability to instantiate COM objects, which could conceivably be .NET librarys exposing a COM interface….?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can some one confirm me that only one UIWindow instance is possible in any
Can anyone tell me how an IDE like NetBeans or any for that matter
Can someone explain dependency injection with a basic .NET example and provide a few
Can not find scala.actors package in latest milestones, while it still presents in scaladocs:
Can I run VLD extension over IIS or Apache that works over windows? and
Can I order my users in the database, so I don't have to say
Can any one tell, how to get the result of LINQ query contains group
Can I be sure about the order in a Python dictionary? The function op.GetTangent(id)
Can I call select before recv_from on a socket that is blocking?
Can someone maybe tell me why this is not working? I have used echo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.