MSFN Forum: Blank comamnd line window on FirstLogonComamnds - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Blank comamnd line window on FirstLogonComamnds Rate Topic: -----

#1 User is offline   MrEs 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 18-August 09

Posted 27 September 2009 - 09:13 PM

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



#2 User is offline   MrEs 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 18-August 09

Posted 27 September 2009 - 09:20 PM

Forgot attachment :)

Attached File(s)



#3 User is offline   ricktendo64 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,120
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 27 September 2009 - 10:05 PM

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.

This post has been edited by ricktendo64: 27 September 2009 - 10:07 PM


#4 User is offline   MrEs 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 18-August 09

Posted 27 September 2009 - 10:14 PM

Ofcourse! Thanks! :)

#5 User is offline   maxXPsoft 

  • MSFN Master
  • Group: Developers
  • Posts: 2,482
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 28 September 2009 - 05:46 AM

yep
Cmd.exe. If used without parameters, cmd displays the version and copyright information of the operating system.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy