Jump to content

Is there a way to ...


Recommended Posts

Hi all :hello:

I'm building my unattended multi cd , and unattended installs are ready ...

but in regular installations I would like to execute a batch during install without using winnt.sif because

"Repair" function can't be executed ... so is there a way to edit txtsetup.sif or another file to copy/execute

a command .. I'm thinking about an .inf file will set a runoncex key or something ...

Please come on if you have a half (or full^^) solution :thumbup

edit: is it possible to copy a file in start folder of all users in txtsetup.sif ? I will try ...

Edited by sonic
Link to comment
Share on other sites


Okay cmdlines.txt only in $OEM$ is treated during normal installation ! great.

But in repair mode cmdlines.txt seems to be ignored ... we can see a small cmdline but it close too fast for do anything ... and it's same file / cmd command which works great in normal mode ...

The problem for me is if I repair an OS with my multi cd path of I386 isn't original because there are subfolders ... and after I have a script to redefine registry to search to the correct original i386 folder (at root of cdrom ...)

(The script is here http://www.msfn.org/board/index.php?showtopic=64215 )

Thanks for any idea.

Link to comment
Share on other sites

How about placing a WinRAR SFX in the $OEM$ "All Users" Startup directory ($OEM$ | $Docs | All Users | Start Menu | Programs | Startup) that runs a .cmd file in TEMP mode? The .cmd file would delete the SFX from Startup at the end of the operation. Name the SFX "Install.exe" and the .cmd "run.cmd." Maybe something like this:

Install.exe

Path=%windir%\Temp
Setup=run.cmd
Silent=1
Overwrite=1
Title=Extracting files...

run.cmd

@ECHO OFF
Routine 1
Routine 2
DEL "%userprofile%\Start Menu\Programs\Startup\Install.exe"
CLS
EXIT

Edit: @MHz (below) Good point, I missed that completely. Guess I don't fully understand what's trying to be accomplished here, will try rereading this when I'm a little less bleary. :P

Edit/Edit: I get it. I see no unattended option either.

Edited by blinkdt
Link to comment
Share on other sites

I like the effort to post, blinkdt. But with No Winnt.sif to activate OEMPreInstall of $OEM$ to copy over, then it looks like your idea is cooked.

Without Cmdlines.txt and SVCPack.inf that will not be available for repair install, then I do not see an option.

Perhaps txtsetup.sif? Not sure.

Link to comment
Share on other sites

you're right Mhz, I have completed my project but this feature is a must for me and I want to find any replacement ... for the moment txtsetup.sif is the solution but it seems just to copy files in %windir% ... I don't find anything about a full path for better ... I try to fin how works nLite about his .inf file ... perhaps I can set a RunOnceEx key with it ... testing in progress ...

Thanks for any informations !

Link to comment
Share on other sites

My final solution ! :thumbup

Set i386 source to original value in repair mode, because I use multi windows cd, i386 source value look like that d:\aocd\i386 and final client will have problem when he will insert his original disc ..)

1) Create two batchs files

FixI386.cmd

@echo off
mode con cols=60 lines=20
color 70
title Fix I386 source ...
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:\WIN51 set source=%%i:\
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "SourcePath" /d "%source%i386" /f >NUL
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" /v "Installation Sources" /t REG_MULTI_SZ /d "%source%\" /f >NUL
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" /v "SourcePath" /d "%source%\" /f >NUL
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" /v "ServicePackSourcePath" /d "%source%\" /f >NUL
reg add "HKLM\SOFTWARE\Microsoft\Transaction Server\Setup(OCM)" /v "Source Path" /d "%source%\" /f >NUL
reg add "HKLM\SOFTWARE\Microsoft\MSDTC\Setup" /v "Source Path" /d "%source%\" /f >NUL
reg add "HKLM\SOFTWARE\Microsoft\COM3\Setup" /v "Source Path" /d "%source%\" /f >NUL
del /q /f %0
exit

SetFixI386.cmd

move /y %SystemRoot%\FixI386.cmd "%AllUsersProfile%\Menu D‚marrer\Programmes\D‚marrage\"
del /q /f %0
exit

2) Modify TxtSetup.sif

Just after [sourceDisksFiles] section add these two line to copy file in %SystemRooot% (e.g. C:\WINDOWS)

SetFixI386.cmd = 1,,,,,,,1,0,0
FixI386.cmd = 1,,,,,,,1,0,0

3) Modify HiveSft.inf

Before [AddReg.Upgrade] section add this line to specify setup to execute SetFixI386.cmd during GUI part (at T-33 )

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","FixI386",0x00020000,"%SystemRoot%\SetFixI386.cmd"

and that's all.

Summary :

Dunring text mode, two batch are copied to C:\WINDOWS\

At the end of text part Windows read HiveSft.inf and set RunOnce key

Reboot & GUI part start ...

At T-33, SetFixI386.cmd is executed and it moves FixI386.cmd to Start folder of All Users ...

Atfer all completed and first login of any users, FixI386.cmd is executed and value of i386 source path is restored to original ...

edit: Credits to nuhi with his nlite.inf way ...

Edited by sonic
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...