Jump to content

FirstLogonCommands


Recommended Posts

jamieo for all pratical purposes this FirstLogonCommands replaces the Runoncex

All with no popups or annoying junk. FirstLogonCommands run's with Full Admin privleges. nothing confusing there

I do create a user in Admin group which it run's under so apps are installed to my account. Thats under <UserAccounts> in oobesystem which executes before the Firstlogon

I use FirstLogonCommands to call a cmd file which

1. does my Quicklaunch. visible when desk loads

2. starts my music playing, need my Rock and Roll

3. executes my App installer to install 60 apps. It calls cleanup at the end which does the shutdown and reboot

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

BTW The last command in it was to call my App Installer, If I stop and exit it for any reason all bets are off. Restarting then the UAC kicks in and starts the popups

EDIT:

BTW, I mount my image and move Install folder to root of Image so when Image is laid down the Install becomes C:\Install, D:\Install or whatever drive is selected.

Edited by maxXPsoft
Link to comment
Share on other sites


Thanks for the explanation Maxxpsoft. :)

I am actually using the Synchronous Commands under the specialize and oobe passes but as you've been calling it firstlogon.cmd I thought you meant a batch file! Spent at least 30mins searching for some info on that!! :D

I'm sure others will benefit from the info though.

said it several times in these posts Firstlogon.cmd, as an Admin with all right's and at the end run cleanup.cmd

Jamie

Link to comment
Share on other sites

  • 3 months later...
  • 6 months later...

i have one question. many guides are using auditsystem pass to install programs. isn't this an easier way to launch setups?

i will try this in a couple of hours:

i made a batch file called Install.cmd and added a FOR loop to set the DVD letter, then added start /wait for 5 msi setups to install.

i mounted install.wim and copied Install.cmd to root (%SYSTEMDRIVE%)

then added FirstLogonCommands to my Autounattend.xml.

i hope this works because i think this could be an easy way to install programs instead of using auditSystem.

has anyone tried this already?

will post my results.

Link to comment
Share on other sites

Don't use the audit passes installing Apps here either. Tried and didn't like the results

Been doing this way to install my APPS since VERSION 1.3.5 which was way before this post started. Probably Sept 2006

Firstlogoncommands processes

REM SETTING WALLPAPER

REM SETTING DREAMSCENE will override wallpaper

REM Quicklaunch

REM VistaUA APPS Installer

installs my APP launcher and it figures out the drive and such that a folder called APPS is located on and when done does the cleanup/reboot like XP UA.

Why reboot? setupcomplete.cmd installs the Hotfixes that you can't integrate and that means also you need a reboot after OOBe which allows them to complete

Link to comment
Share on other sites

well, everything worked fine, my apps were installed using Install.cmd injected into the root of install.wim and calling it from FirstLogonCommands.

i have a question anyway, is there a way that one can install programs and have them displayed one by one like we used to do with XP RunOnceEx? i want them being displayed so i know where is my cmd file at any given time without using echo to display cmd window.

Link to comment
Share on other sites

lol yes,

runoncex is still alive and kicking in Vista and can be used. Its what I use basically to install my APPS or rather i use the structure with my Installer. Then with my Runoncex tester I use exactly the Runoncex and the list appears even in Vista

Link to comment
Share on other sites

Pass? I usually do that in sequence with Firstlogoncommands since it has the elevated User running it and no popups, yes

Installing IE7 used to disable it in XP/Vista but I had found a workaround.

I used to place an XP version iernonce.dll 6.0.2900.2180 somewhere and just call it by Path

rundll32.exe D:\Tools\iernonce.dll,RunOnceExProcess

iernonce.dll 7.0.6000.16512 in Vista worked just a few minutes ago.

rundll32.exe D:\Windows\System32\iernonce.dll,RunOnceExProcess

Link to comment
Share on other sites

but after you use FirstLogonCommands to run the script that contains the RunOnceEx entries do they run in that moment or you have to restart the computer after you just logged in in order to RunOnceEx to kick in?

im asking because if the user is already logged for the FirstLogonCommands to work, i think i need to restart the computer so those entries can run. am i right? wrong?

thanks for the feedback.

Link to comment
Share on other sites

at the bottom of your cmd file WITH runoncex entries you just call it to run it. Same way I done it in XP Installs countless times in Runoncex.cmd.`

So basically call a cmd file within FirstLogonCommands or add say 5 entries in your cmd you are calling with Firstlogoncommands and call the executuion of it before the end of file. Just use the Start /Wait to keep it alive till it finishes.

Example below

Loading Dreamscene in Firstlogoncommands Example

Haven't posted this in forever

Color 0A
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "RunOnceEx - Testing Applications" /f
REG ADD %KEY% /v Flags /t REG_DWORD /d "20" /f

REG ADD %KEY%\1001 /VE /D "cMenu 2.6" /f
REG ADD %KEY%\1001 /V 101 /D "CMD /C Start /Wait E:\APPS\cMenu\cmenu.exe /silent" /f
REG ADD %KEY%\1001 /V 102 /D "REGEDIT /S E:\APPS\cMenu\cMenu1.reg" /f

rundll32.exe D:\Windows\System32\iernonce.dll,RunOnceExProcess
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...