Jump to content

Installing some applications upon firstlogon


Recommended Posts

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?

Link to comment
Share on other sites


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 first

here are examples

Use "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 by maxXPsoft
Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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 fixed

use

cmd /c REGEDIT /S %MEDIA%\APPS\RegisterSettings.reg

cmd /c start %MEDIA%\APPS\MSSE-NL-v1.0.1961.0_64bit.exe

%MEDIA% represents your drive like F:

Edited by maxXPsoft
Link to comment
Share on other sites

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 by Raoul90
Link to comment
Share on other sites

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

Copied it from one of your autounattend.xml files, will try this out (copied cmd to mounted wim).

Link to comment
Share on other sites

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 off

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

REGEDIT /S %MEDIA%\APPS\RegisterSettings.reg

Start /Wait %MEDIA%\APPS\MSSE-NL-v1.0.1961.0_64bit.exe

EXIT

Copied 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 :thumbup

seems a lot of people can't get applications to install from xml, course some can

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

goto command line

type "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>

Link to comment
Share on other sites

goto command line

type "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 Time

Which is correct because I had that in my old autounattended.xml, forgot to change that then.

I will try both, see what happens. :)

Link to comment
Share on other sites

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

OEMs 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 by maxXPsoft
Link to comment
Share on other sites

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

OEMs 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

Hmm, OK, I will try that, why you attrib the dir first?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 3 weeks later...

Allright, I have time to test again, so I will basically test this now:

X86:

@echo off
REGEDIT /S %systemdrive%\APPSX86\RegisterSettings.reg
Start /Wait %systemdrive%\APPSX86\MSSE-NL-v1.0.1961.0-X86-UP2DATE.exe
RD /S /Q %systemdrive%\APPSX86
EXIT

X64:

@echo off
REGEDIT /S %systemdrive%\APPSX64\RegisterSettings.reg
Start /Wait %systemdrive%\APPSX64\MSSE-NL-v1.0.1961.0-X64-UP2DATE.exe
RD /S /Q %systemdrive%\APPSX64
EXIT

Called 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 by Raoul90
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...