D8TA Posted August 4, 2011 Posted August 4, 2011 I have created a sysprep image for Windows XPsp3 that will pull the BIOS asset tag and enter it for the Computer Name and join my domain. This image is dual purpose, for users who get the full blown Office 2007 (Word, Excel, PowerPoint and Outlook) and users who only get certain full components of Office 2007 (Outlook, the other components are just viewers, Excel Viewer, Word Viewer, Power Point Viewer). I have a bat file that works manually but when I place it in the sysprep GUIrunonce section of my sysprep file the bat file launches both entries. Probably a little confusing...ok, alot confusing so I'll elaborate. I have a file on the drive a batch file that needs to be ran so the user can specifiy what they should get regarding the Office suite. This also installed some hard drive encryption software. The batch files goes something like this:REM Simple Menu SystemCLS:startecho .echo .echo This is the image for such and such usersecho Image 3bcecho Choose what type of user you areecho ====================================echo .echo 1. Full Office Userecho 2. Viewer Office Userecho .echo Enter option (1 or 2)Replyif errorlevel 50 goto Officeif errorlevel 49 goto Viewerrem beep:Office C:\path to install batch file:ViewerC:\path to install batch fileendWhen the machine starts up and goes through sysprep everything is fine and I can login to the domain with my AD credentials. Then the runoncegui launches, this batch file and stars installing Office and doesn't give me an opportunity to hit 1 or 2. If I run this manually it works like it is suppose to. Is the reply causing the issue. Any suggestions on how to fix or an alternative solution?Thanks.
Mordac85 Posted August 23, 2011 Posted August 23, 2011 (edited) All you're doing is echoing the choices. You have nothing there to capture any user input.like@echo offsetlocal<insert echo statements for the menu>Choice /C 12 /M "Enter option: "if "%ERRORLEVEL%"=="1" goto :Officeif "%ERRORLEVEL%"=="2" goto :Viewergoto :END:OfficeC:\path to install batch filegoto END:ViewerC:\path to install batch filegoto :END:ENDendlocalor@echo offsetlocal<insert echo statements for the menu>set /P IMG=Enter option (1 or 2): if "%IMG%"=="1" goto :Officeif "%IMG%"=="2" goto :Viewergoto :END:OfficeC:\path to install batch filegoto END:ViewerC:\path to install batch filegoto :END:ENDendlocalOf course, you can probably come up w/a way to automate the install based on the user. If you really get ambitious, you can try using MDT Edited August 23, 2011 by Mordac85
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