Topic: No icons to other programs with usb boot scripts  (Read 9224 times)

Re: No icons to other programs with usb boot scripts
« Reply #20 on: November 09, 2012, 06:15:18 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
TXTAddLine,"%TargetDir%\windows\system32\autorun.cmd","dpinstL.exe /p:%CDDrive%\%pTextRootFolder% /s","Append"
A shorter way to write:
Code: [Select]
TXTAddLine,%target_sys%\autorun.cmd,"dpinstL.exe /p:%CDDrive%\%pTextRootFolder% /s",Append


Now I just need help delaying the start of penetconfig untill dpinstl finishes.
Sleep may help
http://theoven.org/index.php?topic=52.0


Well, since I do not use nt6x ;) good luck on your tasks  :thumbsup:

Re: No icons to other programs with usb boot scripts
« Reply #21 on: November 09, 2012, 11:53:03 AM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Well seen, thanks for reporting carfan :thumbsup:
Best to keep the quote In case of space in Target Root Folder, as for shortcut.
Code: [Select]
TXTAddLine,%target_sys%\autorun.cmd,"dpinstL.exe /p:#$q%CDDrive%\%pTextRootFolder%#$q /s",Append

on server Driver Package Installer

By cons, even if the option is available, I think it is better to use "Driver Integration" script (used dism) with the option "Load drivers at startup", gives:
Code: [Select]
TXTAddLine,%TargetDir%\windows\system32\autorun.cmd,"PnpUtil.exe -i -a X:\Windows\inf\oem*.inf",Append

"Driver Package Installer" uses dpinst.exe, which copies the drivers several times when installing and thus we lose space on X:.
I believe it is better to Keep "Driver Package Installer" for drivers that you are not sure to use every time (additional drivers following specific hardware, graphics driver not always used, ...)

Good building
:cheers:
« Last Edit: November 09, 2012, 11:55:00 AM by ChrisR »

Re: No icons to other programs with usb boot scripts
« Reply #22 on: November 09, 2012, 12:10:00 PM »

laddanator

  • Chef
  • ***
  • Location: Virgina
  • Date Registered: Oct 2012
  • Posts: 268
Quote
"Driver Package Installer" uses dpinst.exe, which copies the drivers several times when installing and thus we lose space on X:.
I believe it is better to Keep "Driver Package Installer" for drivers that you are not sure to use every time (additional drivers following specific hardware, graphics driver not always used, ...)

Agreed. I just have the driver pack installer stuff on the desktop in case of emergency but after my PE build, I just mount he wim and inject the mass and lan drivers with DISM and my build size doesn't go up that much. Never had a problem yet with room on X or %systemdrive% this way and never had a lan than didn't load yet so I am super happy with this method.  :dance:

Re: No icons to other programs with usb boot scripts
« Reply #23 on: November 09, 2012, 01:34:16 PM »

carfan

  • Jr. Chef
  • **
  • Date Registered: Oct 2012
  • Posts: 21
First, I want to thank you and Lancelot in helping me learn to crawl with winbuilder scripts. I have read, understand, and agree with keeping the ram drive as small as possible. Now, please don't stone me with this request. I the UBCD4Win/Bartpe world, we can set the start order of the autoruns. I other words - all autoruns designated with the #1 start, run and finish before any of the autoruns designated with the #2 start. Is this achievable with this project?

Thanks
Carfan

Re: No icons to other programs with usb boot scripts
« Reply #24 on: November 09, 2012, 01:36:15 PM »

laddanator

  • Chef
  • ***
  • Location: Virgina
  • Date Registered: Oct 2012
  • Posts: 268
Good question about autorun order.  :thumbsup:

Re: No icons to other programs with usb boot scripts
« Reply #25 on: November 09, 2012, 02:45:50 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi, and answer is Yes  :smiling9:

of course we have ordered run processes  :thumbsup:
else we could not start a PE  :lol:
(but sadly not a common way organised...., badd ms baddd :) )

we expect end user use general purpose
Add_Shortcut,AutoStart
which works as in normal Windows Startup ;)
and it will be no trouble for end user part when changing projects/shell/tools :)

the reason behind is, as you also face, to avoid troubles when changing project/shell/tools,
end user using special organisations made for projects/shell/tools cause rewriting such special used lines

and in fact, end user very mostly do not need such usage (and use this hardcode ways redundantly, bulk...),
and wherever required popularly (making sense  :thumbsup: ),
we tend to provide options through plugins so we can feedback plugins in time easly with changing project/shell/tools.  :cool:

I guess (not sure) UBCDWin use coolmon, Gena also have Coolmon with Add_Shortcut,AutoStart
--> (since no order required for that except at very end ;) )
A common example between Gena and Win7PESE is MultiRes, launched by Add_Shortcut,AutoStart
--> (since no order required for that except at very end ;) )

Generally, such demand from end user comes associated with Penetwork,
although Penetwork itsself provides "after launch" option,
to less complicate, ease end user,
we added PeNetwork_After.cmd option on Penetwork latest plugin(s) on server



If you have ordered personal task ??? than consider using a batch (.cmd) file with
Add_Shortcut,AutoStart
Reply #5 http://theoven.org/index.php?topic=365.msg6041#msg6041
demonstrates quick way,
and it is easy to create good ordered task special batch (.cmd)..... start /wait....


Well, still if this solution does not fit what you are after ?
(which may not  :thumbsup: )
 than let us know so we can help on decision of using special adjustments , syntax or not  :thumbsup:
« Last Edit: November 09, 2012, 02:46:26 PM by Lancelot »

Re: No icons to other programs with usb boot scripts
« Reply #26 on: November 09, 2012, 04:07:40 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
In addition to your good question,
The answer is yes but unfortunately not so easy for Win7pese users at first.
There is, Add_Shortcut,AutoRun or AddAutoRun which is run before the shell (pgm loaded following the order in win7pe.cfg).
After loading the shell (eg: explorer), there is RunOnce and also autorun*.cmd (no real order in RunOnce, I don't know for autorun.cmd, autorun1.cmd...).

There is also RunOnceEx would allow to start programs sequentially after shell (UBCD4Win uses as Gena), it is available for user but not really used in w7pese base project, it is against well used in Gena.
Here is the syntax:
Code: [Select]
RegWrite,HKLM,0x1,Tmp_Software\Microsoft\Windows\CurrentVersion\RunOnceEx\001,MyApps1,#$q%PathtoMyApps%#$q %Parameter%
RegWrite,HKLM,0x1,Tmp_Software\Microsoft\Windows\CurrentVersion\RunOnceEx\500,MyApps500,#$q%PathtoMyApps5%#$q %Parameter%

There is a trick about 0x1 or 0x2, 1 of 2 does not work, I do not remember.


About PENetwork, it is started by RunOnce, difficult to use RunOnceEx due to its setting ("Close program" after starting network...)
For commands after there is PeNetwork_After.cmd option designed for this or via PENetwork editor and CMDs after.
For commands before or ordered personal task, the easier is as Lancelot's suggesteded, a special batch in Add_Shortcut,AutoStart

If your question is related to your post #12 (after the dpinst pnputil is done running I want to autostart penetwork)
You can also try by changing in "Driver Integration" script line 69

Code: [Select]
//If,ExistFile,%target_sys%\autorun.cmd,begi-n
//  TXTDelLine,%target_sys%\autorun.cmd,exit
//  TXTAddLine,%target_sys%\autorun.cmd,"PnpUtil.exe -i -a #$pSystemRoot#$p\inf\oem*.inf",Append
//  TXTAddLine,%target_sys%\autorun.cmd,exit,Append
//End
AddAutoRun,LoadoemDriver,PnpUtil.exe,"-i -a #$pSystemRoot#$p\inf\oem*.inf",3

So the drivers are loaded before the shell and before PENetwork, but more time before having hand.

There is may be, certainly, possible improvements for loading drivers (driver choice, before, after) in a future script.
and perhaps something to do to facilitate the use of RunOnceEx. Your time and idea are welcome.

:cheers:
« Last Edit: November 09, 2012, 10:46:55 PM by ChrisR »

 

Powered by EzPortal