mrjoli021 Posted June 13, 2012 Posted June 13, 2012 I am looking for a way to install ms office with no user interaction and read the serial from a text file.
Decipher Posted June 14, 2012 Posted June 14, 2012 Check the help file for Run() or RunWait().Regarding the silent install look here: http://technet.microsoft.com/en-us/library/dd630736.aspxIf the information in the link above is outdated i.e. the command line switches don't work with your version then try: http://www.google.com/search?q=ms+office+silent+install plus your version of office or search technet. Spoiler
Moderators JLogan3o13 Posted June 14, 2012 Moderators Posted June 14, 2012 Hi, mrjoli021. The easiest way to do a silent install of Office 2007 or 2010 is to use the built-in Office Customization Tool first. Go to where you have the install files and run Setup.exe with the /admin switch to open the customization tool. You can then cycle through the tool to set almost any kind of settings you would like, including the activation key. Then save the resultant .MSP file in the same folder as the Setup.exe. You can then run the installation silently with the following: ShellExecuteWait(@scriptdir & "setup.exe", "/adminfile MyCustom.MSP"); <--change the MSP name to whatever you choose. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
mrjoli021 Posted June 14, 2012 Author Posted June 14, 2012 I have already a single exe. when I call the with /slient it installs without any options except prompting for the key. I would like to have this read from a txt file.
Moderators JLogan3o13 Posted June 14, 2012 Moderators Posted June 14, 2012 Which version of Office are you installing? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
BrewManNH Posted June 14, 2012 Posted June 14, 2012 You can create an automated installation file with Office by starting the Setup program with the /admin switch and filling in the information you have to, to get it to install without prompts. 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 GudeHow 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
Moderators JLogan3o13 Posted June 14, 2012 Moderators Posted June 14, 2012 That is what I was suggesting, but from the OP's statement that he has a "single exe" it sounds as though this may be an earlier version. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Mechaflash Posted June 14, 2012 Posted June 14, 2012 Business or Personal use? If business, how many machines? Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”
BrewManNH Posted June 14, 2012 Posted June 14, 2012 That is what I was suggesting, but from the OP's statement that he has a "single exe" it sounds as though this may be an earlier version.Not sure how I missed that post. 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 GudeHow 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
mrjoli021 Posted June 14, 2012 Author Posted June 14, 2012 (edited) office 2010 pro Edited June 14, 2012 by mrjoli021
Moderators JLogan3o13 Posted June 14, 2012 Moderators Posted June 14, 2012 (edited) office 2010 proThen the easiest way is to follow the suggestion in post 3 and create an MSP.Edited to fix spelling I should be ashamed of. Edited June 14, 2012 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
mrjoli021 Posted June 14, 2012 Author Posted June 14, 2012 it worked. Question. I am planing to use this to setup several laptops both 32bit and 64 how can I check whether the machine is 32 or 64?
mrjoli021 Posted June 14, 2012 Author Posted June 14, 2012 I see a problem. I would like to use this to install it on several machines and I dont want to use the same key. Is there a way to specify the key as a parameter?
BrewManNH Posted June 14, 2012 Posted June 14, 2012 If you do that, then you can't use the same script for each installation, or the same msp file, as far as I'm aware of. What is the point of doing a silent install but needing to input a different key for each machine? 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 GudeHow 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
Decipher Posted June 14, 2012 Posted June 14, 2012 The world revolves around convience. The information in the link I shared has all the information you need. I assume there is no command line switch used to specify the product key at run time, look into creating your own VIA the config.xml. The AutoIt language is well documented. I'd advise anyone using AutoIt to review it's contents. Look at these functions: FileRead() StringBetween() StringReplace() FileWrite() If your interested in doing such and need help then show some code and we'll be glad to assit you. Spoiler
Moderators JLogan3o13 Posted June 15, 2012 Moderators Posted June 15, 2012 All you would need to do is create two .msp files with the Customization Tool. Then in your script, check for the @OSArch like so. If @OSArch = "X64" Then ShellExecuteWait(@scriptdir & "setup.exe", "/adminfile Myx64.MSP") Else ShellExecuteWait(@scriptdir & "setup.exe", "/adminfile Myx86.MSP") EndIf "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now