开发者

Wrap an office 2010 installation exe into a setup project?

This is weird I know but here it is: I have 10 or so satellite offices that I manage and I am rolling the software installs into config free / settings free images to keep onsite for reinstalling crashes etc, all of my files are done except for the Office 2010 installation.

What I am trying to do is this:

  1. The Office Install EXE has been set with the config.xml to silent install with the key for that user and all. it is one disc for all the users and uses a master xml file for keys names etc., the installer asks one question "select the user name" and when the person installing the application hits next button the program inserts the values for that user into the string and writes that to a config.xml in the installation folder for office and starts the install.

  2. when the office install is done it will create开发者_如何学Python the prf file for the outlook profile and run the outlook.exe/importprf \yadda\yadda command.

  3. the application will then say it is done and close.

The Problem in detail:

  • this (I think) should be very simple, I am not sure how to monitor the install of the office application so that when it is done it triggers the next step in the process. i thought about ending the application there and using a registry key for first run to run the command to import the profile but I would rather see if i could get this to work the way i have laid out above if at all possible.

Now I am not the smartest man on earth so if there is another way to automate the install of retail office suite and automatically install the users profile using some config files i am all for it I just want the least amount of steps on-site as possible. in my solution the installer selects the name then after the profile import has to type in the password and they are done. as a side note is there a setting in the PRF file for a password (using a pop3 account) and a setting for save password? It would be nice but I am sure there isn't.

Now to save time, these are all separate small businesses w/o a DC and each company doesn't have enough licenses to do Open Value Licensing and I already know that all this can be solved using Office Customization Tool to create a prf file with a network install and logon script. Also I already have images of the system to do a bare metal restore these installs are for cases where a full system reinstall are not necessary.


The answer is not in a setup project but in an old fashioned windows form. I realized that:

  1. I really didn't need a setup project to do this.
  2. Could use a custom process.start() in conjunction with waitforexit() to achieve the desired result.
  3. Then just continue from there.

Well anyway that is my solution to my weird problem, I just posted the answer so that if anyone else had to do something like this they would have it.

Example:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Diagnostics;


namespace waitforexittesting
{
static class Program
{

    static void Main()
    {
        LaunchCommandLineApp();

    }

    static void LaunchCommandLineApp()
    {

        // Use ProcessStartInfo class
        ProcessStartInfo startInfo = new ProcessStartInfo();
        startInfo.CreateNoWindow = false;
        startInfo.UseShellExecute = false;
        startInfo.FileName = "C:\\googletalk.exe";
        startInfo.WindowStyle = ProcessWindowStyle.Hidden;

        try
        {
            // Start the process with the info specified.
            // Call WaitForExit and then the using statement will close.
            using (Process exeProcess = Process.Start(startInfo))
            {
                exeProcess.WaitForExit();
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
            }
        }
        catch
        {
            // Log error.
            MessageBox.Show("The file could not be found.", 
         "My Application",MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);

        }
    }

}
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜