Afterdawn Posted February 6, 2005 Share Posted February 6, 2005 (edited) I want to have my DevicePath-key automatically set at the T-39 minute stage, by means of a DetachedProgram. I know that a program called SetDevicePath.exe exists, but I want to create it in a script, so that I can add/modify my own things...I currently run this script as a detachedProgram, and it does change the DevicePath entry correctly in the registy (complete with %systemdrive% and all), however it seems like when this script is run, Windows Setup has already read the values from the Registry, because my custom drivers aren't installed..I use this script:@echo offset drivers_path=%SystemDrive%\driversset drivers_prefix=%%SystemDrive%%\driversset newPath=%%SystemRoot%%\infcall :traverse %drivers_path%reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion /v DevicePath /t REG_EXPAND_SZ /d %newPath% /fgoto :eof:traverse pushd %~f1 if EXIST *.inf ( set curPath=%drivers_prefix%%~2 call set newPath=%%newPath%%;%%curPath%% ) for /d %%I in (*) do ( call :traverse "%%I" "%2\%%I" ) popdgoto :eofWho can help me out?Note: I already have a solution where you can automatically add entries to the winnt.sif file. Look here if interested. So that is, before the installation, at ISO-creation time. But now I want to create a script that does this at Install-time. Edited February 6, 2005 by Afterdawn Link to comment Share on other sites More sharing options...
Afterdawn Posted February 6, 2005 Author Share Posted February 6, 2005 -Updated my startpost- Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted February 6, 2005 Share Posted February 6, 2005 -Updated my startpost-Run if BEFORE setup > you'll need a fake setup.exe that allows you to execute a batch file = Pyron's method > you can use Pyron's SetDevicePath.exe > makes your batch file obsolete Link to comment Share on other sites More sharing options...
Afterdawn Posted February 6, 2005 Author Share Posted February 6, 2005 I've come so for already, I won't resort to using Pyron's files after all...Yes I'm thinking about running it prior to setup too... well I'll try that. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now