Jump to content

Integrating Applications into a RIS image.


Recommended Posts

Hi!

Sorry I am not following u on what it is u need to get it to work at this point? please elaborate... :blushing:

Is it the part with the autologon or what? or is that it loggs u on using local credentials rather than domain credentials?

Edited by Br4tt3
Link to comment
Share on other sites


Well basically the two scripts do not run automatically. I need to manually log on before they are executed. The first time I log on, the script (e.g. claims.cmd) runs and adds the keys into the registry. The pc then restarts and DOES autologin this time, the apps are then installed.

The problem seems to be the order in which everything happens.

When I had one RunOnceEx.cmd file run by cmdlines.txt (which I believe is run at T-12) everything was installed fine.

I think the problem is that the keys might be added to the registry too late in the installation for them to be used in the first post-install boot.

I'm sorry, I know that doesn't really explain it very well.

Steve

Link to comment
Share on other sites

Actually I've worked out that on the 1st boot up, once I manually login it is the login.cmd that runs and restarts the computer. Then the computer does autologin and run start to install the applications. I'm not exactly sure when the claimtec.cmd is executed.

Steve

Link to comment
Share on other sites

Hmm...

Yup, sounds like if u r on to something there. I assumes the login.cmd contains the same code as u were running in the RunOnceEx.cmd file (which was working) and is applicable to all the clients, either if installing the specific software for one department or the other, correct?

Then move that code back to the cmdlines.txt file (if it was working from that point..) and keep the specific department installation script in the [GuiRunOnce] section?

Also, dunno know if u already seen this, but u can also specify the correct domain autologon with the regkey:

HKLM\SOFTWARE\Microsoft\Windows NT\Current Version\WinLogon\AltDefaultDomainName

When using batch files for execution and u wanna have control on it, then execute the script with Start /Wait params to get the process, to halt and wait until the first process has been performed before moving onto the next one.. Use ECHO to display something in the screen so u can keep track during development.

P.S Once done, try moving from batch to WSH (Windows Scripting Host) instead because u have much better possibilities to control what is happening when launching sequential actions.

Oh, and one other thing, when launching multiple actions from the [GuiRunOnce] section u need to specify it as follows:

[GuiRunOnce]
Command0 = "my first command"
Command1 = "my second command"
Command2 = "and so on..."

If not using the Command0 before each <command> to run, setup will perform the first action and then move along (as a result claims.cmd is not being executed).

Hope it solves it for u...

Edited by Br4tt3
Link to comment
Share on other sites

Ok,

So when everything was working, cmdline.txt looked like this...

[COMMANDS]
"RunOnceEx.cmd"

Which then ran RunOnceEx.cmd

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
SET KEY2="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

REG ADD %KEY2% /V DefaultPassword /D "bogbrain" /f
REG ADD %KEY2% /V DefaultUsername /D "Administrator" /f
REG ADD %KEY2% /V DefaultDomainName /D "Claimtec" /f
REG ADD %KEY2% /V AutoLogonCount /t REG_DWORD /d 1 /f
REG ADD %KEY2% /V AutoAdminLogon /D "1" /f
REG ADD %KEY2% /V ForceAutoLogon /D "1" /f


REG ADD %KEY% /V TITLE /D "Installing Applications" /f


REG ADD %KEY%\010 /VE /D "Faxclient 12" /f
REG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\faxclient.msi /QN" /f

REG ADD %KEY%\015 /VE /D "Adobe Reader 7" /f
REG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\Adobe\ar.msi /QN" /f

REG ADD %KEY%\020 /VE /D "Claimtec ULR 8.1.1" /f
REG ADD %KEY%\020 /V 1 /D "%systemdrive%\install\ClaimTec8.1.1.msi /QN" /f

REG ADD %KEY%\025 /VE /D "Office 2003 std." /f
REG ADD %KEY%\025 /V 1 /D "\\serverris\Office2003\STD11.MSI /QB" /f

REG ADD %KEY%\030 /VE /D "Cleaning Up and Rebooting" /f
REG ADD %KEY%\030 /V 1 /D "%systemdrive%\install\cleanup.cmd" /f



EXIT

Which worked fine.

Now should I put the contents of Login.cmd directly into cmdlines.txt without any changes or should I leave cmdlines.txt to link to RunOnceEx.cmd and put the contents of Login.cmd into RunOnceEx.cmd?

Am I able to have commands in both RunOnce (within the .sif file) and RunOnceEx?

Am I right in thinking that if I use cmdlines.txt to run RunOnceEx that the login details will be entered early enough for them to work and RunOnce (within .sif file) will run once the computer logs on?

Steve

Link to comment
Share on other sites

Well, I just tried putting the login details in runonceex.cmd and running it from cmdlines.txt but the result was even worse!!! This time it gets stuck at the welcome screen, asking me to setup the internet connection etc.

It then logs me in automatically to windows but nothing happens. I have to restart before the application installatino script runs.

Is there anyway I can write a command within cmdlines.txt that uses the %BUILDTYPE% variable and would activate the correct installation script at the t-12 mark.

Steve

Edited by Steve.mccall
Link to comment
Share on other sites

Hi!

Like I said, I never used RunOnceEx or cmdlines.txt so no expert on that part but as from what I can gather in ur previous posts:

1. Autologon features was working when launched from cmdlines.txt! Then keep that code within this file and the autologon part should be working later on in the installation... as I see it, there is no need to link to another file that will be executed and install software from this point. Do that from the [GuiRunOnce] section of ur winnt.sif file instead.

2. Once the setup will perform an autologon for u, the execution of software installations are easiest handled from the [GuiRunOnce] seciton of ur unattend file. Please specifiy it as;

[GuiRunOnce]

Command0 = "Start /Wait c:\install\<software-install-all-clients>.cmd"

Command1 = "Start /Wait c:\install\%software-install-selected-clients%.cmd" <-- variable feat. disucssed

COmmand2 = "cscript.exe c:\install\<what-ever-else-to-do>.vbs"

Note: In the batch files, supply a "Pause" so that u can stop and halt and check which file is running and so on.. Once u r comfortable with the flow of the install, remove the "Pause" and it will be totally unattended, same goes for vbscripts and wscript.echo. Also, try to just to get the autologon feat. working first from the cmdlines.txt part with no software installs. Then, go and add the entries of the [GuiRunOnce] section and u will see it comes together.

Checking in later, getting a sausage... mmm... mmm..

Is there anyway I can write a command within cmdlines.txt that uses the %BUILDTYPE% variable and would activate the correct installation script at the t-12 mark.

Never tried it, but I dont think so... unless .vbs or .js scripts can be run at the T-12 mark. Easier if u just get the autologon feature working. Once there, just add the installation scripts to the [GuiRunOnce] section assuming the code within these scripts are working (which u said they did).

Danish sausages r0x..

Link to comment
Share on other sites

Enjoy your sausage!

I was thinking. Surely the .sif file should auto login to windows anyway, without any other files needed. I've supplied all the commands to it. Why isn't it logging in? I'm going to try tweaking that 1st. Then it should be simple to run the install file.

Steve

Link to comment
Share on other sites

Unless u have changed it since this post u have (winnt.sif):

[GuiUnattended]
AdminPassword=xxxx
EncryptedAdminPassword=no
AutoAdminLogon=yes <------- Wrong value I guess
AutoAdminLogon=1 <------- Wrong value I guess
ForceAutoLogon=1
OemSkipRegional = 1
TimeZone = %TIMEZONE%
OemSkipWelcome = 1

[GuiRunOnce]
%systemdrive%\install\Login.cmd <--- No Start /Wait
%systemdrive%\install\%BUILDTYPE%.cmd <--- No Start /Wait

My code for performing the installations(winnt.sif):

[GuiUnattended]
AdminPassword = "MyPassWord" <-- More than 8 char. enclose pass in ""
AutoLogon = Yes
AutoLogonCount = 3

Maby this will do it.... :whistle:

Link to comment
Share on other sites

Oh what fun this is!

I've managed to edit my .sif file so the admin logs on fine and executes the script. The problem now is that the script doesn't take effect until the next reboot. So if I could issue a reboot command as soon as the pc logs on and increase the number of auto logons to 2, then it should all work!

test.sif

;SetupMgrTag
[Data]
AutoPartition=1
MsDosInitiated="1"
UnattendedInstall="Yes"
floppyless="1"
OriSrc = "\\%SERVERNAME%\RemInst\%INSTALLPATH%\%MACHINETYPE%"
OriTyp="4"
LocalSourceOnCD=1

[SetupData]
OsLoadOptions="/noguiboot /fastdetect"
SetupSourceDevice = "\Device\LanmanRedirector\%SERVERNAME%\RemInst\%INSTALLPATH%"

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=yes
TargetPath=\WINDOWS
FileSystem=LeaveAlone
NtUpgrade=No
OverwriteOemFilesOnUpgrade=No
OemPnPDriversPath="Drivers\000_chipset\IntelINF;Drivers\001_network\Marvell;Drivers\002_graphics\Intel;Drivers\003_audio;Drivers\004_SATA"
DriverSigningPolicy=Ignore
ExtendOEMPartition = 0
InstallFilesPath = "\\%SERVERNAME%\RemInst\%INSTALLPATH%\%MACHINETYPE%"
LegacyNIC = 1

[GuiUnattended]
AdminPassword="xxxx"
EncryptedAdminPassword=NO
AutoLogon=Yes
AutoLogonCount=1
OEMSkipRegional=1
TimeZone=%TIMEZONE%
OemSkipWelcome=1

[UserData]
ProductKey=xxxx
FullName="Steve McCall"
OrgName="xxxx"
ComputerName=%MACHINENAME%

[Display]
BitsPerPel=32
Xresolution=1024
YResolution=768
Vrefresh=60

[RegionalSettings]
LanguageGroup=1
SystemLocale=00000809
UserLocale=00000809
InputLocale=0809:00000809

[SetupMgr]
DistFolder=C:\windist
DistShare=windist

[GuiRunOnce]
Command0=%systemdrive%\install\%BUILDTYPE%.cmd

[Identification]
JoinDomain=%MACHINEDOMAIN%
DoOldStyleDomainJoin=Yes

[Networking]
InstallDefaultComponents=Yes
ProcessPageSections=Yes

[RemoteInstall]
Repartition=Yes
UseWholeDisk = Yes

[OSChooser]
Description="NEW TEST"
Help="NEW TEST"
LaunchFile="%INSTALLPATH%\%MACHINETYPE%\templates\startrom.com"
ImageType=Flat

Could I enter command1= reboot or something?

Steve

Link to comment
Share on other sites

Told you I'd be back!

I'm having a few problems with my next installation type. It involves much moving around of directories and applying of patches. Here is my current script...

Ensign.cmd

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Ensign Applications" /f

REG ADD %KEY%\005 /VE /D "Installing ODBC" /f
REG ADD %KEY%\005 /V 1 /D "regedit.exe /s %systemdrive%\install\odbc.reg" /f

REG ADD %KEY%\010 /VE /D "Faxclient 12" /f
REG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\faxclient.msi /QN" /f

REG ADD %KEY%\015 /VE /D "Adobe Reader 7" /f
REG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\Adobe\ar.msi /QN" /f

REG ADD %KEY%\020 /VE /D "Office 2003 std." /f
REG ADD %KEY%\020 /V 1 /D "\\serverris\Office2003\STD11.MSI /QB" /f

REG ADD %KEY%\025 /VE /D "Clearing .db File Association" /f
REG ADD %KEY%\025 /V 1 /D "regedit.exe /s %systemdrive%\install\removeDB.reg" /f

REG ADD %KEY%\030 /VE /D "Mapping Progress Install Drives" /f
REG ADD %KEY%\030 /V 1 /D "%systemdrive%\install\MapProgress.cmd" /f

REG ADD %KEY%\035 /VE /D "Installing Progress 91D" /f
REG ADD %KEY%\035 /V 1 /D "r:\setup.exe -s -f1q:\setup.iss" /f

REG ADD %KEY%\040 /VE /D "Installing Progress Service pack 5" /f
REG ADD %KEY%\040 /V 1 /D "t:\setup.exe -s -f1s:\setup.iss" /f

REG ADD %KEY%\045 /VE /D "Installing Ensign Live" /f
REG ADD %KEY%\045 /V 1 /D "%systemdrive%\install\EnsignVBS\CopyLive.vbs" /f

REG ADD %KEY%\050 /VE /D "Copying Directories" /f
REG ADD %KEY%\050 /V 1 /D "%systemdrive%\install\EnsignVBS\Copy2folders.vbs" /f

REG ADD %KEY%\055 /VE /D "Configuring Progress for Ensign" /f
REG ADD %KEY%\055 /V 1 /D "%systemdrive%\install\EnsignVBS\Copy1-3.vbs" /f

REG ADD %KEY%\055 /VE /D "Copying Files" /f
REG ADD %KEY%\055 /V 1 /D "%systemdrive%\install\EnsignVBS\Copy4Files.vbs" /f

REG ADD %KEY%\060 /VE /D "Cleaning Up and Rebooting" /f
REG ADD %KEY%\060 /V 1 /D "%systemdrive%\install\Commands\cleanup.cmd" /f



EXIT

There are no problems at all until the mapping drives key is added. From there each command doesn't wait long enough for the previous install or directory move to happen. I'm not really sure the way around this problem. Possibly setting a restart after every command, but I don't think the restart will wait for the install to finish.

Steve

Link to comment
Share on other sites

Hi again....

From what I can pick in ur post, u r adding/telling the installation to add setup actions of applications (through the use of RunOnceEx) from the cmdlines.txt (T-12)?

My question is why? Maby there are some features to this that I am not aware of, the only thing that pops into mind is that it is a good place to add entries to ur default profile/hive and so on....

I strongly recommend u to launch the installation sequence(s) from the [GuiRunOnce] section of the unattend file. That way u have better control over the flow when using either batch files with the Start /Wait functionality or using Windows Scripting Host (.js or .vbs) where u will have excelent control over the installations...

Check the previous posts, and there is examples on using the WScript.Run features to control the behaviour of the app installations.

NOTE: Make sure that the installations sources in unpacked when using the for install. For example:

Some applications (especially .exe files using InstallShield according to me...) that comes in the format of .exe's sometimes unpacks a .msi or something else to a temp dir, once done it will launch another process to handle the actual installation (for example setup.exe or setup.msi). In this case, the .vbs script will not work because the script looks at the first process to end before continuing. So unpack if necessary is my advice...

Over to the sausages again...

Link to comment
Share on other sites

Well what is happening is that the commands to install the applications are called from within the GuiRunOnce section of the .sif file.

They in turn add the application reg keys to the registry.

The applications are then installed via GuiRunOnce when the computer first logs on.

The problem seems to be that windows can't recognise when an installation has finished and starts the next one in the series too early.

Steve

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