views:

58

answers:

3

Hi,

I need to create an installation file for Windows in such a way that the setup:

  1. Registers the .exe at startup so it launches everytime machine is booted
  2. Runs the .exe and opens a webpage upon completing installation .

Could anyone please give me some tips on how I could do this?

A: 

One option is to look into using WiX to create the installer.

For requirement #1, you could put a shortcut into the startup folder, as discussed here.

For requirement #2, you can execute a ShellExecute CustomAction to open the URL, and I believe, run the application.

ChronoPositron
+1  A: 

Any installer can do all of the above. A good free one is InnoSetup; make sure you also download a GUI script creation tool like ISTool or InnoIDE (also free). I've used ISTool, but not InnoIDE.

Ken White
A: 

The problem is not in installers such as Inno Setup, Windows Installer, Wise, InstallShield, etc. The real problem is how to make a program runs in every start-up of Windows. There are many choices to do that. One way is to put your EXE program path in the following registry key:

  HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
      or
  HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run

But there many other locations would do. It depends on what kind of program you had, in which start-up stage you want the program starts, and in what context the program will be run (local machine or current user). Please read the following article in MSDN

Understand and Control Startup Apps

So, after you choose an appropriate location for your need, you choose which Installer you are going to use to implement it. If you're a Delphi/Pascal programmer, Inno Setup is made for you; If you like PHP language, maybe NSIS is the right choice; and so on.

On Windows Vista and later, you must concern the UAC issue. If you use Inno Setup, be sure to include the following statement in [Setup] section

  PrivilegesRequired=admin

On Windows Vista and later, if you want to suppress the notification that some uncertified autostarting programs has been blocked by Windows, you should use Task Scheduler to set your program runs automatically at Windows start-up. You could execute Task Scheduler by running Schtasks.exe from your installation program. See the command line options for Task Scheduler and its description.

Finally, my advice, if you want to attract people to your questions, try to accept and/or to vote up (if possible) supposing you get a point from an answer. With your current acceptance rate, I doubt people are willing to look to your problem deeply.

Vantomex