1

I'll begin with an apology since I am new to c++ and maybe my questions make no sense.

I have a c# app, unfortunately it requires .Net framework to be installed on the machine. I'd like to make a c++ application that will copy a .Net installer from a cd, and run the installer on quite mode. The c++ app must be hidden, no console or what so ever, and also the most important thing is: it must run on a clean install of windows xp/

Please help me :)

I have no idea how to approach this, since I've never used c++ before.

P.S. (if it's possible to run a c# app that can do the above, saying how would be appreciated).

I tried googling but failed to get an answer

user535448
  • 37
  • 3
  • You should accept answers to your other questions. In order to do that you can check a mark sign just below the answer score. – Benoit Mar 08 '11 at 14:23
  • Installing .net is not quick, but there are silent MSI based installers you can use. – Steve-o Mar 08 '11 at 14:26
  • 1
    I really don't wanna help you realize that. I'm really not comfortable with people installing things silently. Why can't the user (at least see) the installation process? Why can't it just be unattended install instead? – RedX Mar 08 '11 at 14:31
  • You should also add "C#" and ".NET" as a topic of this question. I know C++, but I cannot answer your question, because I don't know anything about C#, also not about".NET". – AudioDroid Mar 08 '11 at 14:33
  • 2
    Installing software when the user inserts a disc without notifying the user or giving her an option to skip the install is a grossly unethical practice. This question does not belong on a Q+A site for professional programmers. – Hans Passant Mar 08 '11 at 14:46
  • AudioDroid - you don't have to know anything about c# or .Net, all I need is to have a c++ app [with no visible interface] that can copy a file to a different path, and can simply execute .exe files with arguments/flags. – user535448 Mar 08 '11 at 15:02
  • The reason I need it to be invisible is because it's designed for the unexperienced elders and kids. I have no immediate access to all the computers of my client and the user should be able to run an app written in c#. I want it to look as clean as possible and that's why I don't want a visible installer, or any interface. – user535448 Mar 08 '11 at 15:04
  • You can't anymore. Windows has cleaned up its Autoplay act, and since this is considered a security issue the changes have been backported to XP SP3. You *will* get a UI question. – MSalters Mar 08 '11 at 15:24
  • @user: I agree with Hans. What you are trying to do is unethical. Even if your target audience is presumed by you to be idiots barely capable of making toast, you still must give the user the option to control the installation themselves. Making the default a "no questions asked" install is fine, so long as granny's grandson has at least the opportunity to click "Advanced Install" in which they can choose all options, destinations, etc. Don't be *that guy*. – John Dibling Mar 08 '11 at 15:36
  • Besides. How do you even know that the computer's going to have a C: drive on which it should be installed? – John Dibling Mar 08 '11 at 15:38
  • Please, I think you all got the wrong message.. I'm developing a platform for games using c# with .Net, this is meant for specific computers where my client works. He has over 40 computers there and he'll soon receive more with clean windows xp installation. – user535448 Mar 08 '11 at 16:01
  • @John Dibling: That's the smallest of problems. You install to "Program Files" (`CSIDL_COMMON_PROGRAMS`) and hope that non-administrators don't insert CD's. – MSalters Mar 08 '11 at 16:02
  • 1
    @user535448: On a real network, i.e. belonging to an AD domain? In that case there are even better options. – MSalters Mar 08 '11 at 16:04

1 Answers1

0

I dont know why you want to have a c++ app to launch the dot net installer. This can be achieved from within DOT NET env itself. Add a Setup project to your current solution. It can detect installed .net framework and depending on your application's dependencies can offer to install one automatically. However by default it will try to download the framework but if you intend to supply it on your CD you can configure it to pick up the installer from a local location as well. Refer here to get you started http://support.microsoft.com/kb/307353

d-live
  • 7,926
  • 3
  • 22
  • 16