Raoul90 Posted March 13, 2010 Posted March 13, 2010 Hi,I am trying to install some things upon firstlogon.I tried this: <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /q /c for %i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %i:\APPS\RegTweaks.reg REGEDIT /S %i:\APPS\RegTweaks.reg</CommandLine> <Description>Register Tweaks</Description> <Order>10</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /q /c for %i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %i:\APPS\MSSE-NL-v1.0.1961.0_64bit.exe start %i:\APPS\MSSE-NL-v1.0.1961.0_64bit.exe</CommandLine> <Description>Register Tweaks</Description> <Order>20</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> </FirstLogonCommands>But nothing happening when I logon in my test install @ VMWare?Some registertweaks apply to useraccount, so thats why I want it at firstlogon.Also I want to install the MSSE at firstlogon.Someone knows a way that does work?
maxXPsoft Posted March 14, 2010 Posted March 14, 2010 (edited) I am trying to install some things upon firstlogon.you don't need the FOR %%i IN (C but 1 time as long as it is firsthere are examplesUse "Windows Media" around anything might have names with spaces in it.<SynchronousCommand wcm:action="add"> <Order>1</Order> <Description>Setting Path Variable</Description> <CommandLine>cmd /c "FOR %%i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) do if exist %%i\sources\install.wim set MEDIA=%%i"</CommandLine></SynchronousCommand><SynchronousCommand wcm:action="add"> <Order>2</Order> <Description>MSSE-NL-v1.0.1961.0_64bit</Description> <CommandLine>cmd /c start %MEDIA%\APPS\MSSE-NL-v1.0.1961.0_64bit.exe</CommandLine></SynchronousCommand>This will set %MEDIA% to a drive then you use that variable %MEDIA%\ Edited March 14, 2010 by maxXPsoft
Raoul90 Posted March 14, 2010 Author Posted March 14, 2010 Hmm OK, thanks, will give it a try: <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /c "FOR %%i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) do if exist %%i\sources\install.wim set MEDIA=%%i"</CommandLine> <Description>Setting Path Variable</Description> <Order>1</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>%MEDIA%\APPS\RegisterSettings.reg REGEDIT /S %i:\APPS\RegisterSettings.reg</CommandLine> <Description>Register Tweaks</Description> <Order>2</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>%MEDIA%\APPS\MSSE-NL-v1.0.1961.0_64bit.exe start %i:\APPS\MSSE-NL-v1.0.1961.0_64bit.exe</CommandLine> <Description>MSSE-NL-v1.0.1961.0_64bit</Description> <Order>3</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> </FirstLogonCommands>
maxXPsoft Posted March 14, 2010 Posted March 14, 2010 (edited) Hmm OK, thanks, will give it a try:won't work REGEDIT /S %i:\APPS\ sorry I really didn't look at your cmd lines just copied and fixedusecmd /c REGEDIT /S %MEDIA%\APPS\RegisterSettings.regcmd /c start %MEDIA%\APPS\MSSE-NL-v1.0.1961.0_64bit.exe%MEDIA% represents your drive like F: Edited March 14, 2010 by maxXPsoft
Raoul90 Posted March 14, 2010 Author Posted March 14, 2010 (edited) Hmm I used this: <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /c "FOR %%i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) do if exist %%i\sources\install.wim set MEDIA=%%i"</CommandLine> <Description>Setting Path Variable</Description> <Order>1</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /c REGEDIT /S %MEDIA%\APPS\RegisterSettings.reg</CommandLine> <Description>Register Tweaks</Description> <Order>2</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /c start %MEDIA%\APPS\MSSE-NL-v1.0.1961.0_64bit.exe</CommandLine> <Description>MSSE-NL-v1.0.1961.0_64bit</Description> <Order>3</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> </FirstLogonCommands>No register-tweaks applied and also MSSE is not installed? Edited March 14, 2010 by Raoul90
Raoul90 Posted March 14, 2010 Author Posted March 14, 2010 Would a this work? <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /C start /wait %systemdrive%\Windows\Setup\SCRIPTS\FirstLog.cmd</CommandLine> <Description>FirstLogonScript</Description> <Order>1</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> </FirstLogonCommands>FirstLog.cmd:@echo offFOR %%i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) do if exist %%i\sources\install.wim set MEDIA=%%iREGEDIT /S %MEDIA%\APPS\RegisterSettings.regStart /Wait %MEDIA%\APPS\MSSE-NL-v1.0.1961.0_64bit.exeEXITCopied it from one of your autounattend.xml files, will try this out (copied cmd to mounted wim).
maxXPsoft Posted March 14, 2010 Posted March 14, 2010 Would a this work? <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /C start /wait %systemdrive%\Windows\Setup\SCRIPTS\FirstLog.cmd</CommandLine> <Description>FirstLogonScript</Description> <Order>1</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> </FirstLogonCommands>FirstLog.cmd:@echo offFOR %%i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) do if exist %%i\sources\install.wim set MEDIA=%%iREGEDIT /S %MEDIA%\APPS\RegisterSettings.regStart /Wait %MEDIA%\APPS\MSSE-NL-v1.0.1961.0_64bit.exeEXITCopied it from one of your autounattend.xml files, will try this out (copied cmd to mounted wim).most likely it will. Thats what I do seems a lot of people can't get applications to install from xml, course some can
Raoul90 Posted March 15, 2010 Author Posted March 15, 2010 ARGHH!!! It doesnt work either, this is getting pretty **** annoying, lol. Other ideas?Also my timezone setting doesnt pass: <TimeZone>C. Europe Time</TimeZone>Is it wrong or something? Should it be Central Euro Time? (full) or?
MrJinje Posted March 15, 2010 Posted March 15, 2010 goto command linetype "tzutil /G"that will tell you exactly how to specify your current time zone from your local machine. If I had to guess it will either be this. <TimeZone>Central European Standard Time</TimeZone>or this, both are UTC +1 <TimeZone>Central Europe Standard Time</TimeZone>
Raoul90 Posted March 15, 2010 Author Posted March 15, 2010 goto command linetype "tzutil /G"that will tell you exactly how to specify your current time zone from your local machine. If I had to guess it will either be this. <TimeZone>Central European Standard Time</TimeZone>or this, both are UTC +1 <TimeZone>Central Europe Standard Time</TimeZone>If I type that I get:W. Europe Standard TimeWhich is correct because I had that in my old autounattended.xml, forgot to change that then.I will try both, see what happens.
maxXPsoft Posted March 15, 2010 Posted March 15, 2010 (edited) ARGHH!!! It doesnt work either, this is getting pretty **** annoying, lol. Other ideas?<RequiresUserInput>false</RequiresUserInput> is not needed. I think it is used with AsynchronousCommand%systemdrive%\Windows\Setup\SCRIPTS\FirstLog.cmdOEMs use that folder to fire off certain cmd files so should be able to.I do it different since Windows 7 is a tight a$$ about using them folders so I create an Install dir on root. attrib it when I first start then run my scripts, could then delete the folder Edited March 15, 2010 by maxXPsoft
Raoul90 Posted March 19, 2010 Author Posted March 19, 2010 ARGHH!!! It doesnt work either, this is getting pretty **** annoying, lol. Other ideas?<RequiresUserInput>false</RequiresUserInput> is not needed. I think it is used with AsynchronousCommand%systemdrive%\Windows\Setup\SCRIPTS\FirstLog.cmdOEMs use that folder to fire off certain cmd files so should be able to.I do it different since Windows 7 is a tight a$$ about using them folders so I create an Install dir on root. attrib it when I first start then run my scripts, could then delete the folderHmm, OK, I will try that, why you attrib the dir first?
maxXPsoft Posted March 19, 2010 Posted March 19, 2010 Hmm, OK, I will try that, why you attrib the dir first?I used to need to do that cause Sysprep was not firing off in x64 when I test Audit Mode. I'd edit the .cmd files to try something different but they wouldn't save. Found that to be a path problem
Raoul90 Posted April 6, 2010 Author Posted April 6, 2010 (edited) Allright, I have time to test again, so I will basically test this now:X86:@echo offREGEDIT /S %systemdrive%\APPSX86\RegisterSettings.regStart /Wait %systemdrive%\APPSX86\MSSE-NL-v1.0.1961.0-X86-UP2DATE.exeRD /S /Q %systemdrive%\APPSX86EXITX64:@echo offREGEDIT /S %systemdrive%\APPSX64\RegisterSettings.regStart /Wait %systemdrive%\APPSX64\MSSE-NL-v1.0.1961.0-X64-UP2DATE.exeRD /S /Q %systemdrive%\APPSX64EXITCalled from FirstLogonCommands in autounattend.xml: <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /C start /wait %systemdrive%\APPSX86\FirstLog.cmd</CommandLine> <Description>FirstLogonScript</Description> <Order>1</Order> </SynchronousCommand> </FirstLogonCommands> <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>cmd /C start /wait %systemdrive%\APPSX64\FirstLog.cmd</CommandLine> <Description>FirstLogonScript</Description> <Order>1</Order> </SynchronousCommand> </FirstLogonCommands>Hope it works! Edited April 6, 2010 by Raoul90
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