Jump to content

Blank comamnd line window on FirstLogonComamnds


Recommended Posts

Hey all,

I've got a small, niggling issue... What happens is when my installation gets up to the FirstLogonCommands they run, however the systems has a blank 'command line' screen, and the installation stops until the user manually CLOSES this window. See the attached pic...

What am i doing wrong? :(

My first logon commands in my autounattended.xml look like this:

			<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>cmd %systemdrive%\Install\firstlogon.cmd</CommandLine>
<RequiresUserInput>true</RequiresUserInput>
<Description>SetupUser</Description>
</SynchronousCommand>
</FirstLogonCommands>

My firstlogon.cmd looks like this:

@echo off

start /wait REGEDIT /S %systemdrive%\Install\UserRegTweaks1.Reg
start /wait "%PROGRAMFILES%\Internet Explorer\iexplore.exe" %systemdrive%\Install\IESetup.html
start /wait REGEDIT /S %systemdrive%\Install\UserRegTweaks2.Reg
cmd copy %systemdrive%\Install\Configure_IE.lnk %userprofile%\Desktop\

start /sleep 60 REGEDIT /S %systemdrive%\Install\Install\UserRegTweaks2.Reg


exit

Link to comment
Share on other sites


Add /c switch to after cmd, it will execute your bat file then close when done

			<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>cmd /c %systemdrive%\Install\firstlogon.cmd</CommandLine>
<RequiresUserInput>true</RequiresUserInput>
<Description>SetupUser</Description>
</SynchronousCommand>
</FirstLogonCommands>

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]

/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains
/S Modifies the treatment of string after /C or /K (see below)
/Q Turns echo off
/D Disable execution of AutoRun commands from registry (see below)
/A Causes the output of internal commands to a pipe or file to be ANSI
/U Causes the output of internal commands to a pipe or file to be
Unicode
/T:fg Sets the foreground/background colors (see COLOR /? for more info)
/E:ON Enable command extensions (see below)
/E:OFF Disable command extensions (see below)
/F:ON Enable file and directory name completion characters (see below)
/F:OFF Disable file and directory name completion characters (see below)
/V:ON Enable delayed environment variable expansion using ! as the
delimiter. For example, /V:ON would allow !var! to expand the
variable var at execution time. The var syntax expands variables
at input time, which is quite a different thing when inside of a FOR
loop.

Edited by ricktendo64
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
  • Recently Browsing   0 members

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