Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Microsoft Office 2010 Batch File


  • Please log in to reply
2 replies to this topic

#1 djmiiller

djmiiller

  • Members
  • 27 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Missouri
  • Local time:03:54 AM

Posted 18 November 2014 - 08:12 AM

Hello I am creating a batch file for Microsoft Office but I cant seem to get it to work. Not sure what the problem is. Any help with be greatly appreciated. When I run the program I get a setup error that says "Path or file specified with /adminfile was not found or did not contain any patches. Not sure what im doing wrong. Here is the code I am using. Please take a look and see if you can find something wrong with it. 

 

 

 

@ECHO OFF

IF EXIST "%ProgramFiles(x86)%\Microsoft Office\Office14"*.* GOTO END
CLS
IF EXIST "%ProgramFiles%\Microsoft Office\Office14"*.* GOTO END
CLS

ECHO Installing Microsoft Office 2010
ECHO

if "%programfiles(x86)%XXX"=="XXX" goto 32BIT
echo 64-bit Windows installed
ECHO
ECHO ...Installing 64 Bit Version
CALL %CD%"\setup\Software\Microsoft\Office\2010\64bit\"setup.exe /adminfile %CD%"\setup\Software\Microsoft\Office\2010\64bit\Updates\"Durham.msp
goto END

:32BIT
echo 32-bit Windows installed
PING 127.0.0.1 -n 2 -w 1000 >nul
ECHO ...Please Wait
PING 127.0.0.1 -n 2 -w 1000 >nul
ECHO ...Installing 32 Bit Version
CALL %CD%"\setup\Software\Microsoft\Office\2010\32bit\"setup.exe /adminfile %CD%"\setup\Software\Microsoft\Office\2010\32bit\Updates\"Durham.msp

:END
EXIT

 

 

 

Thanks

DJ Miiller



BC AdBot (Login to Remove)

 


#2 NullPointerException

NullPointerException

  • Banned
  • 125 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:02:24 PM

Posted 18 November 2014 - 12:14 PM

CALL %CD%"\setup\Software\Microsoft\Office\2010\64bit\"setup.exe /adminfile %CD%"\setup\Software\Microsoft\Office\2010\64bit\Updates\"Durham.msp

You have a full-stop? If it's intentional, then I have no idea. Are you sure adminfile exists?


Edited by NullPointerException, 18 November 2014 - 12:14 PM.


#3 djmiiller

djmiiller
  • Topic Starter

  • Members
  • 27 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Missouri
  • Local time:03:54 AM

Posted 18 November 2014 - 01:02 PM

Thank you Null for your response. I have been messing around with my code all morning and finally have it working. I talk to one of my friends that does code also and he told me that the adminfile was for office 2007 and not for 2010 so I took that out and it works great now.

 

Thanks for your help!
DJ






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users