Jump to content

Installing some applications upon firstlogon


Recommended Posts

The FirstLogonCommands setting specifies commands to run the first time a user logs on to the computer. These commands run only once.

Valid Configuration Passes

oobeSystem Configuration Pass

you have it in specialize

OMG, you gotta be kiddin me, will change it, lol.

Edited by Raoul90
Link to comment
Share on other sites


It is working now! :)

But I still want to install from DVD:

            <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%\APPSX64\RegisterSettings.reg</CommandLine>
<Description>Register Tweaks</Description>
<Order>2</Order>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c start %MEDIA%\APPSX64\MSSE-NL-v1.0.1961.0-X64-UP2DATE.exe</CommandLine>
<Description>MSSE-NL-v1.0.1961.0_64bit</Description>
<Order>3</Order>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
</FirstLogonCommands>

Wont work tho.

Link to comment
Share on other sites

don't have the : in it. change like this. I haven't used that in long time so had to go back to my Unattendxp application.

FOR %%d 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 %%d\sources\install.wim SET MEDIA=%%d

Link to comment
Share on other sites

don't have the : in it. change like this. I haven't used that in long time so had to go back to my Unattendxp application.

FOR %%d 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 %%d\sources\install.wim SET MEDIA=%%d

Hmm OK, will give that a try.

BTW why this happens:

why.png

At firstlogon? And it doesnt continue until I shut those cmd prompts manually.

FirstLogon.cmd looks like this:

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

Edited by Raoul90
Link to comment
Share on other sites

Hello Raoul90

Try it

@echo off

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:\Appx86 set CDROM=%%i:

set APPx86PATH=%CDROM%\APPx86

cd %APPx86PATH%

Start /wait %APPx86PATH%\yourapplication.exe

Exit or shutdown /r

Link to comment
Share on other sites

BTW why this happens:

START /WAIT is a cmd upon itself to do correctly

cmd /C START /WAIT

and they will close

Ah, right! :D

So this will work right?

            <FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /C start /wait %systemdrive%\APPSX64\MSSE-NL-v1.0.1961.0-X64-UP2DATE.exe</CommandLine>
<Description>MSSE</Description>
<Order>1</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /C REGEDIT /S %systemdrive%\APPSX64\RegisterSettings.reg</CommandLine>
<Description>RegisterTweaks</Description>
<Order>2</Order>
</SynchronousCommand>
</FirstLogonCommands>

Edited by Raoul90
Link to comment
Share on other sites

  • 2 weeks later...

Hello.

I have the same issue with my Unattended installation and I can't find the solution.

I want tho make the same thing has you try here : launch an application or a script at the first logon session.

Did you find the solution ? Can you put it here plz ?.

Thx.

Edited by boubouch
Link to comment
Share on other sites

Yes, I have found a working solution:

SetupComplete.cmd:

@echo off
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Post Installation" /F
REG ADD %KEY%\1/VE /D "Enkele Updates" /f
REG ADD %KEY%\1 /V 1 /D "%SYSTEMROOT%\Setup\SCRIPTS\OptionalUpdates.exe" /f
REG ADD %KEY%\2/VE /D "DirectX Februari 2010 Redist" /f
REG ADD %KEY%\2 /V 1 /D "%SYSTEMROOT%\Setup\SCRIPTS\directx_feb2010_redist.exe" /f
REG ADD %KEY%\3/VE /D "Silverlight 4.0.5.0" /f
REG ADD %KEY%\3 /V 1 /D "%SYSTEMROOT%\Setup\SCRIPTS\Silverlight4050.exe" /f
REG ADD %KEY%\4/VE /D "Register Settings" /f
REG ADD %KEY%\4 /V 1 /D "%SYSTEMROOT%\Setup\SCRIPTS\RegisterSettings_reghack.exe" /f
REG ADD %KEY%\5/VE /D "MSSE 1.0.1961.0" /f
REG ADD %KEY%\5 /V 1 /D "%SYSTEMROOT%\Setup\SCRIPTS\MSSE-NL-v1.0.1961.0-X64-UP2DATE.exe" /f
REG ADD %KEY%\6/VE /D "Windows 7 Settings" /f
REG ADD %KEY%\6 /V 1 /D "%SYSTEMROOT%\Setup\SCRIPTS\Install.CMD" /f
Exit

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