Bâshrat the Sneaky Posted February 5, 2005 Share Posted February 5, 2005 (edited) This script is nice btw, but I'd wonder why he didn't use a utility to update the winnt.sif.That way he could replace the whole :RECREATE routine into this line:nircmd inisetval "d:\xp_unattend\I386\winnt.sif" "Unattended" "OemPnPDriversPath" "~qTHIS_IS_THE_NEW_VALUE~q"http://www.nirsoft.net/utils/nircmd.htmlAnd does that work? If it does, I'll use that...EDIT: the syntax inisetval isn't listed? Edited February 5, 2005 by Bâshrat the Sneaky Link to comment Share on other sites More sharing options...
Afterdawn Posted February 5, 2005 Share Posted February 5, 2005 (edited) Okay, I created my own, and this one definitely works for me. Just modify the 3 values in the begin of my script. The driver_prefix is just the name that should be prefixed for every folder that contains an INF-file.The drivers_path and winnt_file should be surrounded by quotes if you have spaces in your path. Make sure you've downloaded nircmd. @echo offset drivers_path=D:\xp_unattend\$oem$\$1\driversset drivers_prefix=driversset winnt_file=D:\xp_unattend\i386\winnt.sifcall :traverse %drivers_path% %drivers_prefix%nircmd.exe inisetval %winnt_file% "Unattended" "OemPnPDriversPath" "~q%newPath%~q"goto :eof:traverse pushd %~f1 if EXIST *.inf ( if NOT DEFINED newPath ( set newPath=%~2 ) else ( call set newPath=%%newPath%%;%~2 ) ) for /d %%I in (*) do ( call :traverse "%%I" "%2\%%I" ) popdgoto :eof Edited February 5, 2005 by Afterdawn Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted February 5, 2005 Share Posted February 5, 2005 (edited) I'll test it immediately!EDIT: AT LAST some results!!!! Superb 2 questions:[FIXED] 1) is it case-sensitive for the inf file? I assume yes? How to solve it? Simply add the same but then replace *.inf by *.INF?>> It ISN'T case-sensitive!!![FIXED] 2) Isn't it possible to make it no longer required to enter the full path?>>You CAN use relative path, if nircmd.exe and the cmd file are on top of both the driversfolder and the I386 folder!I LOVE YOU Have been searching on this a very long time! Edited February 5, 2005 by Bâshrat the Sneaky Link to comment Share on other sites More sharing options...
Afterdawn Posted February 5, 2005 Share Posted February 5, 2005 I'll test it immediately!EDIT: AT LAST some results!!!! Superb 2 questions:[FIXED] 1) is it case-sensitive for the inf file? I assume yes? How to solve it? Simply add the same but then replace *.inf by *.INF?>> It ISN'T case-sensitive!!![FIXED] 2) Isn't it possible to make it no longer required to enter the full path?>>You CAN use relative path, if nircmd.exe and the cmd file are on top of both the driversfolder and the I386 folder!I LOVE YOU Have been searching on this a very long time!Okay good to hear that it finally works for you now!And you're right, the winnt.sif file can be relative! Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted February 6, 2005 Share Posted February 6, 2005 nircmd.exe inisetval %winnt_file% "Unattended" "OemPnPDriversPath" "~q%newPath%~q"I need to apply this piece of code somewhere else as well..I've searched the net, but couldn't find anything about the '~q' you used... What is it for???Can you please verify this piece of code?SET %D%=DriverPackSET %G%=GraphicsSET %S%=SoundSET %IE%=IF EXISTROBOCOPY M%M% "%CD%" *.* /E /MOV /NS /NC /NFL /NDL /NP /NJH /NJS%IE% I386\presetup.cmd (%IE% OEM\%D%_%G%_V*.7z nircmd.exe inisetval I386\winnt.sif "GUIRunOnce" "command7" "~q%IE% %SYSTEMDRIVE%\DP\G\%G%_Control_Panels.cmd %SYSTEMDRIVE%\DP\G\%G%_Control_Panels.cmd~q"%IE% OEM\%D%_%S%_V*.7z nircmd.exe inisetval I386\winnt.sif "GUIRunOnce" "command7" "~q%IE% %SYSTEMDRIVE%\DP\S\%S%_Control_Panels.cmd %SYSTEMDRIVE%\DP\S\%S%_Control_Panels.cmd~q") ELSE (%IE% $OEM$\$1\DP\G\%G%_Control_Panels.cmd nircmd.exe inisetval I386\winnt.sif "GUIRunOnce" "command8" "~q%IE% %SYSTEMDRIVE%\DP\G\%G%_Control_Panels.cmd %SYSTEMDRIVE%\DP\G\%G%_Control_Panels.cmd~q"%IE% $OEM$\$1\DP\S\%S%_Control_Panels.cmd nircmd.exe inisetval I386\winnt.sif "GUIRunOnce" "command8" "~q%IE% %SYSTEMDRIVE%\DP\S\%S%_Control_Panels.cmd %SYSTEMDRIVE%\DP\S\%S%_Control_Panels.cmd~q")ECHO.ECHO _ commands added to winnt.sif to install %D% %G%/%S% control panels...)Note: I can guarantee you that all required files are present, please just verify the (syntax of) the code!Thanks! Link to comment Share on other sites More sharing options...
sixpack Posted February 6, 2005 Share Posted February 6, 2005 ~q = Double-quote character: "Example: infobox "This is the first line~n~qThis is a second line, in quotes~q" "Example" The above example displays a message-box containing 2 lines.from the help file Link to comment Share on other sites More sharing options...
Afterdawn Posted February 6, 2005 Share Posted February 6, 2005 @ Bâshrat the SneakyThe ~q makes sure that the entry added to OemPnpDriversPath is surrounded by double quotes... just like it should be.The help for NIRCMD is contained in the Help file that's included!About your script.. it's very difficult to see what's it doing / supposed to do.Can't you just tell what you want... and then I could tell you how I should do it! Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted February 6, 2005 Share Posted February 6, 2005 @ Bâshrat the SneakyThe ~q makes sure that the entry added to OemPnpDriversPath is surrounded by double quotes... just like it should be.The help for NIRCMD is contained in the Help file that's included!About your script.. it's very difficult to see what's it doing / supposed to do.Can't you just tell what you want... and then I could tell you how I should do it!Well, in fact it's very easy: if a certain file exists, nircmd adds some values to the winnt.sif file.'visual' explanation:IF method 2 (if driverpack graphics M2 nircmd blablaif driverpack sound M2 nircmd blabla) else (if driverpack graphics M1 nircmd blablaif driverpack sound M1 nircmd blabla)I looked in that helpfile, but only ~$ is mentioned there! @sixpack: thanks for the explanation! Link to comment Share on other sites More sharing options...
Afterdawn Posted February 6, 2005 Share Posted February 6, 2005 I must admit that the code isn't very clear! Replacing IF EXIST by %IE% isn't really helpfull IMHO.Why don't you use clear syntax with indents.. something like your "visual code":if exist (%file%) ( if exist (%graphics_dp%) ( graphics_dp.cmd ) if exist (%lan_dp%) ( lan_dp.cmd ) nircmd BLA BLA BLA) else ( ETCETERA...) Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted February 6, 2005 Share Posted February 6, 2005 Hmm... maybe... but I like shorter code... But you're completely right when you're saying it'd be better for the clarity.... Link to comment Share on other sites More sharing options...
jeremyotten Posted March 30, 2005 Share Posted March 30, 2005 The script works perfect But I have one complaint.When I want to do this with all the BTS driverpacks I get this erroroutput line too long in de DOS box.This means that the output is too big for DOS to handle. The resulting winnt.sif or sysprep.inf is empty because the command could not be completed.Is there a way to increase the output buffer for cmd.exe ?Please advice! Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted March 30, 2005 Share Posted March 30, 2005 (edited) Huh? I don't have that problem... Which version of my DriverPacks are you using?BTW... it's included in the DPs BASE by default...EDIT: and welcome to MSFN.org! Edited March 30, 2005 by Bâshrat the Sneaky Link to comment Share on other sites More sharing options...
jeremyotten Posted March 30, 2005 Share Posted March 30, 2005 The driverbase is made for an unattended install to make a winnt.sifBut I want to make an unattended sysprep image with the oemdriverspath filled in the sysprep.inf.so........the output generated in de cmd box is to big! there's to much info for the dosbox to handle. when I remove a few driverbases everything works!please assist. Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted March 30, 2005 Share Posted March 30, 2005 Well... I suggest you put some of the DriverPacks TEMPORARILY in a DP2 folder, then run the batch file on it and finally change all DP2 instances to DP. Link to comment Share on other sites More sharing options...
jeremyotten Posted March 30, 2005 Share Posted March 30, 2005 this is what I get!C:\sysprep>OemPnPDriversPath.cmd C:\sysprep\DriverPacks c:\sysprep\inf\sysprep.infsysprep\DriverPacks\DriverPack_Graphics_A_V5021\DP\G\A\1;sysprep\DriverPacks\DriverPack_Graphics_A_V5021\DP\G\A\1\WDM_XP;sysprep\DriverPacks\DriverPack_Graphics_A_V5021\DP\G\N;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\A\2;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\I\1;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\I\2;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\I\3;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\M\1;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\M\2;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\M\3;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\S\1;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\S\2;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\S\3;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\V\1;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\V\2;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\V\3;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\V\4;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\V\5;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\X\1;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\X\1\WDM;sysprep\DriverPacks\DriverPack_Graphics_B_V502\DP\G\X\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\3\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\3\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\3\3;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\B;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\B\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\BU\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\BU\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\BU\3;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\D\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\D\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\D\3;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\D\4;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\D\5;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\D\6;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\D\7;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\D\8;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\I;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\L\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\L\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\L\3;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\L\3\B;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\L\4;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\L\5;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\LI\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\LI\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\LI\3;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\LI\4;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\LI\5;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\LI\6;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\LI\7;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\M;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\MI;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\N\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\N\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\N\3;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\N\4;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\N\5;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\N\6;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\N\7;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\N\8;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\NV;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\O\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\O\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\O\3;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\O\4;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\O\5;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\O\6;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\O\7;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\O\8;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\R\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\R\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\S;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\SM\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\SM\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\SM\3;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\SM\4;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\SM\5;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\SM\6;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\SM\7;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\SM\8;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\SM\9;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\T;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\V\1;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\V\2;sysprep\DriverPacks\DriverPack_LAN_V502\DP\L\V\3;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\3\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\3\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\3\3;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\A\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\A\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\A\3;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\A\4;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\A\5;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\A\6;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\A\7;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\A\8;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AD\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AD\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AD\3;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AD\4;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AD\5;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AD\6;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AD\7;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AD\8;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AL;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AM;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\AR;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\D;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\H\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\H\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\H\3;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\H\4;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\IB\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\IB\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\IN\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\IN\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\IT;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\L\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\L\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\L\3;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\L\4;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\N;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\P\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\P\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\P\3;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\P\4;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\P\5;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\P\6;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\P\7;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\P\8;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\Q\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\Q\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\Q\3;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\Q\4;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\S\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\S\2;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\S\3;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\S\4;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\S\5;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\S\6;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\S\7;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\SI\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\V\1;sysprep\DriverPacks\DriverPack_MassStorage_V503\DP\M\V\2;sysprep\DriverPacks\DriverPack_Sound_A_V5031\DP\S\CR\LS\Win2K_XP;sysprep\DriverPacks\DriverPack_Sound_A_V5031\DP\S\CR\WDM;sysprep\DriverPacks\DriverPack_Sound_A_V5031\DP\S\N;sysprep\DriverPacks\DriverPack_Sound_A_V5031\DP\S\R;sysprep\DriverPacks\DriverPack_Sound_A_V5031\DP\S\R\HD;sysprep\DriverPacks\DriverPack_Sound_A_V5031\DP\S\V;sysprep\DriverPacks\DriverPack_Sound_B_V503\DP\S\AThe output is too long.the syntax of the command is wrong.You see he only gets to Driverpack sound b which is the second of the total of 6! 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