Jump to content

Auto Script for Office 2010 install


Recommended Posts

I have been trying to create a script for office 2010 installation but can't seem to get any proper window info for the install screens allowing me to click the proper buttons with AutoIT. The worst culprit is the continue button on the Key insertion screen. Does anyone have any ideas what I could use to get the proper window API info so that ControlClick will work properly with office 2010 installation?

Jody

Link to comment
Share on other sites

Unfortunately I tried that already and it does not work as advertised... I have the complete office image such that depending on the key you enter, it installs home and student or home and business, etc... so the silent install does not work for me, plus I am looking to be able to do this 100's of times without fail. So AutoIT is the best way I can find to do this. Any ideas?

Link to comment
Share on other sites

I am tasked with creating an Install for this product as well, have not started yet. I was planning to use the built in silent install answer file. I will post here when I try it, maybe tomorow. Are you working in a Domain or Workgroup environement?

Link to comment
Share on other sites

Neither. I tried working with the answer file but unfortunately since I am using a new key each time it won't work to just have all the answers except the key and have the office installation only ask for a key. If you find a way please let me know as I worked on it for 2 weeks and got nowhere it somewhat working but the more I tried to get it perfectly the way I wanted, the less it worked properly.

Link to comment
Share on other sites

Why not copy the Config.xml file to the station on which the installation is to be run, dynamically modify the PIDKEY with one's from your master list, and then specify the config location in the setup switch? Look here for setup switches. Just make a master file on the server that is copied to the client and modify the PIDKEY section with one of the keys from your master list.

FYI, why do you have individual keys and not MAK or KMS keys? That is a waste of money...who evaluates the ROI for your organization??

You could also install the product with one key (the same config.xml) and then run the oss.vbs file (included in Office 2010) to update each client's key. Since the keys that you have are single license only, they would fail activation but you would have 30 days to update the key and activate Office. The syntax for that is:

Run(@Comspec & ' /c cscript "' & @ProgramFilesDir & '\Microsoft Office\Office14\ospp.vbs" /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx')
replacing the "x's" with your keys.
Link to comment
Share on other sites

Interesting idea Varian. I never thought of that. Problem is I am in a retail environment where the key has to be typed in each time due to a separate copy being sold. But this does present an opportunity for scripting with installing one key and changing to another right after... and the key can be typed in at the start and the script can enter it for me!

Still the AutoIT approach would work well for my situation at the moment and I would still love to know why the Continue button on the key screen lacks info from all API viewing programs...

Edited by TheSisko
Link to comment
Share on other sites

If you know the systems'names. You could maybe

If @ComputerName = "NAME1" Then
$inpkey = 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx'
Elseif @ComputerName = "NAME2" Then
$inpkey = 'yyyyy-yyyyy-yyyyyy-yyyyyy-yyyyy'
Elseif @ComputerName = "NAME3" Then
$inpkey = 'zzzzz-zzzzz-zzzzz-zzzzz-zzzzz'
Endif

Then Varians command with the variable

Run(@Comspec & ' /c cscript "' & @ProgramFilesDir & '\Microsoft Office\Office14\ospp.vbs" /inpkey:' & $inpkey)
Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

One of the reasons that AutoIt is not working well for automating the installation is that starting with 2007, Microsoft started using graphical overlays (alpha-blending / layered menus) for many of the dialogs. This created trouble for alot of long-standing utilities. For example, VNC. At our office, many of the dialogs would show on the user's side, but would be invisible on our side. I imagine that it is giving AutoIt the same grief.

For silent installs, only the Professional/Corporate versions support it.

(Can I get a big "Thanks Microsoft!")

If the installer still supports supplying the key from the command line (I have not had any luck with it, but that does not mean much), then you can create a file that has all of your keys in list form (one per line), and just read the next one for each installation.

If you need to match the key to a physical certificate of license for each machine, ... well ... I don't envy you.

Edited by willichan
Link to comment
Share on other sites

Yeah it seems that way Willichan,

AutoIT works in a few spots for some buttons, but for others it doesn't seem to... maybe it is just me and my coding but using UISpy which is the only program that will even give me any useful info for Office 2010 installation windows, I try to use [CLASS:Button; TEXT:"&Continue"] to represent the button like I do everywhere else and in every other program and for some reason it does not work... this is the info that UISpy gives me. I have a feeling it might be more of a timing issue but I will check that out later when I get a chance. I will post my code here once I get a chance as well and maybe that will help figure out if I am doing anything wrong!

Link to comment
Share on other sites

maybe it is just me and my coding but using UISpy which is the only program that will even give me any useful info for Office 2010 installation windows

I doubt it is you. Microsoft even messed up some of their own utilities with Office 2007/2010's layered menus. The typical control_send or control_click won't work. You will probably have to use relative coordinates and mouse clicks to get it done, but I can't guarantee that MS will play nicely that way either.
Link to comment
Share on other sites

Like I said though, controlclick does work on the first few menu's then I am not sure if I am just referencing the buttons wrong or just don't have the right program for getting that info. What program(s) do you use for getting that info?

Link to comment
Share on other sites

What program(s) do you use for getting that info?

I don't. Some of the menus/dialogs are no longer compatible with the control_click/Send commands. Microsoft changed the way they handle them. It broke some of my scripts that would remove Windows/Office Live and MSN Toolbar. The scripts just hang when they hit some of the newer versions, since Microsoft did the same thing with some of those apps.

Like I linked to above, it also broke some of MS's own apps.

Since I am working with the Corporate version, I am able to use the built in functions to create custom/automated installs. Since you are working with retail versions, I am pretty sure that you do not have those available to you.

You might check with your MS sales rep to see if there are any tools or procedures that they recommended for doing your deployments.

Edited by willichan
Link to comment
Share on other sites

try option B

http://www.msfn.org/board/topic/72392-office-2007-unattended-setup-fine-tuning/

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

I'll have to try that all again and see if I can get it to work, then change the key afterwards to the one the customer bought. Funny thing is I had tried all of this before and it did not want to work but I think that these instructions at that link are a bit different so maybe this time it will work :)

Now if I could find a way to build the XML file on the fly with the new key in it each time that would be sweet!

Link to comment
Share on other sites

Now I remember why it does not work.... I am using the SingleImage format that allows you to put any version key you want in and them has options specific for the version the key was for afterwards. This makes the silent install quite difficult to do since I would need a different key for each kind of install. So I think I will stick with trying to do it with AutoIT as best I can.

What I don't understand is why will AutoIT work on the first screen but not the next one with the key? The problem that really occurs is that I cannot identify a single piece of text on any screen that will catch for WinActivate and WinWait so I constantly have to use "" instead. This of course makes it that each window is the same and the code just runs through without stopping. All I need is a piece of text on the key screen and a piece of text on the next screen that will make the script wait till this screen is there and then do the key presses. ControlClick is ideal but keypresses are the next best thing...

If anyone has any idea what I could do with AutoIT to be able to at least semi automate Office 2010 install using the SingleImage that would be great. Thanks.

Link to comment
Share on other sites

About the only way to get a clue that the window has changed is to use a Pixel search and hope to catch a spot on the window that changes color when you need to do the next step. Otherwise you'll be using Sleep(xxx) a lot to pause the script for a period of time and hope that the computer isn't slow.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

The problem that really occurs is that I cannot identify a single piece of text on any screen that will catch

Like I said. Microsoft is doing things differently now. Many (not all, but many) of the screens are essentially graphical overlays, as opposed to the controls and text that we have taken advantage of in the past.

I'm sorry, kiddo. I really am. You have a good soul and I hate giving good people bad news.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...