Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


D8TA

Startup Menu after logging on

Recommended Posts

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 System
CLS
:start
echo .
echo .
echo This is the image for such and such users
echo Image 3bc
echo Choose what type of user you are
echo ====================================
echo .
echo 1. Full Office User
echo 2. Viewer Office User
echo .
echo Enter option (1 or 2)
Reply

if errorlevel 50 goto Office
if errorlevel 49 goto Viewer
rem beep

:Office
C:\path to install batch file

:Viewer
C:\path to install batch file
end

When 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.

Share this post


Link to post
Share on other sites

All you're doing is echoing the choices. You have nothing there to capture any user input.

like

@echo off
setlocal
<insert echo statements for the menu>
Choice /C 12 /M "Enter option: "
if "%ERRORLEVEL%"=="1" goto :Office
if "%ERRORLEVEL%"=="2" goto :Viewer
goto :END

:Office
C:\path to install batch file
goto END

:Viewer
C:\path to install batch file
goto :END

:END
endlocal

or

@echo off
setlocal
<insert echo statements for the menu>
set /P IMG=Enter option (1 or 2):
if "%IMG%"=="1" goto :Office
if "%IMG%"=="2" goto :Viewer
goto :END

:Office
C:\path to install batch file
goto END

:Viewer
C:\path to install batch file
goto :END

:END
endlocal

Of 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 by Mordac85

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...