Jump to content

Recommended Posts

Posted

Ok I think i have it solved how to do apps as user and also how to use a second cdrom. As for the apps as user the first loging will always be as admin but the only script that admin runs is this.

from winnt.sif

[GuiRunOnce]
%systemdrive%\install\setup.cmd

next is setup.cmd

CLS
@ECHO OFF
ECHO.
:: REGEDIT /S %systemdrive%\install\Reg_Root_Tweaks.reg
REGEDIT /S .\RUN_ONCE.REG
ECHO.
shutdown -r -f -t 10 -c "rebooting now"
EXIT

then in RUN_ONCE.REG

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"FinishInstall"="c:\\install\\First_Boot.cmd"

ok and now for First_Boot.cmd

CLS
@ECHO OFF
ECHO.
IF EXIST %systemdrive%\install\hotfixes.cmd GOTO RUNCMD
SET CDROM=
IF EXIST D:\install\hotfixes.cmd SET CDROM=D:
IF EXIST E:\install\hotfixes.cmd SET CDROM=E:
IF EXIST F:\install\hotfixes.cmd SET CDROM=F:
IF EXIST G:\install\hotfixes.cmd SET CDROM=G:
IF EXIST H:\install\hotfixes.cmd SET CDROM=H:
IF EXIST I:\install\hotfixes.cmd SET CDROM=I:
IF EXIST J:\install\hotfixes.cmd SET CDROM=J:
IF EXIST K:\install\hotfixes.cmd SET CDROM=K:
IF NOT EXIST %CDROM%\install\hotfixes.cmd GOTO RUNCMD
ECHO If you only have one cdrom please remove your cd
ECHO from the cdrom and place the second cd in the drive.
ECHO.
ECHO If you have two cdroms then make sure your second
ECHO cd is in the second cdrom drive.
ECHO.
PAUSE
ECHO Please wait while applications and hotfixes are copied
ECHO to the hard drive.
xcopy %CDROM%\install %systemdrive%\install\ /S /C /Q /H /Y
ECHO.

:RUNCMD
%systemdrive%\install\main_batch.cmd >> %systemdrive%\install\install.log
; load from second cd without intervention
IF NOT EXIST %systemdrive%\install\hotfixes.cmd GOTO ERROR
%systemdrive%\install\hotfixes.cmd >> %systemdrive%\install\install.log
%systemdrive%\install\CUSTOMIZE.CMD >> %systemdrive%\install\install.log
%systemdrive%\install\applications.cmd >> %systemdrive%\install\install.log
GOTOT END
:ERROR
ECHO.
ECHO *******************WARNING*******************
ECHO Hotfixes and Applications were not installed
ECHO because they could not be found
ECHO *******************WARNING*******************
ECHO.
PAUSE
:END
EXIT

OK I think that is about it. The rest is done through commands.txt wich creates the user and aplies the registry entry that allows that user to autologin. If anybody would like instructions on that let me know.

Also notice above that the cdrom will be recognized even if it is a second cdrom. Enjoy. This will also also work if you burn it all to a dvd as it will detect and use the scripts if they are there and skip the copy process for the second cdrom.

EDIT: FIXED A LITTLE TYPO IN THE FIRST_BOOT.CMD


Posted

wait on this I have not perfected the loading of the registry file to do the runonce.

I jsut tried it and for some reason the runonce was not loaded but all hte rest went as planed. it logs in as admin once and then aplies the runonce registry and then imediatly reboots.

Now as for why the run once does not exicute the registry does not even show it as being there.

Posted

ok got it fixed the run_once.reg should be like this:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"FinishInstall"="c:\\install\\First_Boot.cmd"

I'll fix my post at the top also.

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