Help - Search - Members - Calendar
Full Version: UBCD application autostart on bootup! Please!
UBCD4Win Forums > Other Support > Bart's PE support
SA-ITGuy
Hi Guys,

I've been working with (very extensively) UBCD4Win for the last month or so, the most difficult thing appears to be creating a means to autorun an app on it.
I'm not trying to use a new app that i've added, just trying to get a decent updatable antivirus and antispyware (for which i've picked AV7 and A2-Free) to startup and run without user interaction.

I've searched all over this forum, tried just using Bart PE and manually adding the apps etc but nothing I try can get an item to start manually.

Perhaps there is something very obvious that i'm leaving out (quite likely) but everywhere i've looked it will then have to have been omitted.

In short:
Looking for easy way (include content and names of CMD files if possible) to get AV7 and A2-Free to autostart on bootup.

You help will be very much apprecitated as i've honestly spent hours trying, testing, building and reading seem to still be where i began.

Thanks in advance! worthy.gif
mbarnes
Hi SA-ITGuy


this is the help file for autorun plugin autorun.htm
It should explain what you need to know

regards
Mike barnes

CODE
<html>
<head></head>
<body>
<i>PE Builder v3 plugin</i>
<hr>
<h1>AutoRun 1.0.5</h1>
This plugin creates a (pseudo) Startup Group in BartPE's Nu2Menu.<br>
<br>
The AutoRun plugin will run the AutoRun-files <nobr><I>'AutoRun_*.cmd'</I></nobr> present in <nobr><I>%SystemRoot%\System32</I></nobr>
when Nu2Menu starts (these AutoRun-files will run only once and not again when Nu2Menu reloads).
The AutoRun-files will run one by one (next one starts only after current one finishes) in no specific order.
However for AutoRun-files that depend on each other, the load order can be manipulated by replacing the '_'
in the filename with '1' to '9', or '0' (see below). The AutoRun-files from the '0'-group will run last
and will NOT wait on each other. Use this group for autoruns that might take long time or might not end at all.<br>
<br>
When the 'Scroll-Lock' light is lit when AutoRun starts it will go into debug-mode. Now it will ask
whether to run or to skip each AutoRun-file one by one. When all three 'Locks' are lit ('Scroll-Lock',
'Caps-Lock', and 'Num-Lock') all AutoRun-files will be skipped without asking
(see also <i>Autorun.tag</i> at the bottom for another approach). Use these mode(s) to troubleshoot
AutoRun-files or to be able to skip specific AutoRun-files on purpose. <br>
<br>
For your plugin 'MyPlugin' write your autostart commands in a batch-file called
<nobr><I>'AutoRun_MyPlugin.cmd'</I></nobr> (needs to be placed in your own plugin dir),
put 'exit' in there as last command (otherwise it will not finish and halt
the chain of execution) and add a reference to your INF file (do not forget to substitute your
pluginname for 'MyPlugin'):<br><br>
<tt>
[SourceDisksFiles]<br>
AutoRun_MyPlugin.cmd=2<br>
</tt>
<br>
When you need to manipulate the load order to make sure some AutoRun-files have completed before
other ones are allowed to start, use the load order reference presented here:<br>
<ul>
<li><tt>AutoRun1*.cmd:</tt> will run in group 1 (first group)
<li><tt>AutoRun2*.cmd:</tt> will run in group 2 (after group 1 is finished, before group 3 starts)
<li><tt>AutoRun3*.cmd:</tt> will run in group 3 (after group 2 is finished, before group 4 starts)
<li><tt>AutoRun4*.cmd:</tt> will run in group 4 (after group 3 is finished, before group 5 starts)
<li><tt>AutoRun5*.cmd:</tt> will run in group 5 (after group 4 is finished, before default group starts)
<li><tt>AutoRun_*.cmd:</tt> default group
<li><tt>AutoRun6*.cmd:</tt> will run in group 6 (after default group is finished, before group 7 starts)
<li><tt>AutoRun7*.cmd:</tt> will run in group 7 (after group 6 is finished, before group 8 starts)
<li><tt>AutoRun8*.cmd:</tt> will run in group 8 (after group 7 is finished, before group 9 starts)
<li><tt>AutoRun9*.cmd:</tt> will run in group 9 (after group 8 is finished)
<li><tt>AutoRun0*.cmd:</tt> will run last (after group 9 is finished) and will not wait on each other (running side by side, no execution <B></B>halting)
</ul>
When your AutoRun-file is not depending on other AutoRun-files it is strongly advised to put it in the default
AutoRun group (by using the <nobr><I>'AutoRun_MyPlugin.cmd'</I></nobr> format).<br>
<br>
When your AutoRun-file is taking a long time to run (or even infinite time to run) put it in last group ('0') so
it will not delay nor halt execution of other AutoRun-files.<br>
<br>
AutoRun will not run anything when it encounters a file <i>Autorun.tag</i> in the root of the ramdrive
(<i>%ramdrv%\autorun.tag</i>). You may create such a file by one of your AutoRun-files to prevent unwanted
re-runs of AutoRun in special scenarios with restarted alternate shells. This file <i>Autorun.tag</i> is only
tested for existance at the beginning of AutoRun so creating this file will not influence the current AutoRun session.<br>
<br>
<i>AutoRun v3 plugin by Erwin Veermans (see <a href="http://www.veder.com/nwdskpe/#download" target="_blank">NwDskPE</a>)</i><br>
<hr>
<i>PE Builder
Copyright (c) 2002-2004 Bart Lagerweij. All rights reserved.</i><br>
</body>
</html>
hilander999
The startup sequence is a little different since the release of 3.0.

take a look at the oem1\environment plugin and scroll to the very end of the file.
There you will find a complete listing of all the runonce entried used ins the current release.

Use what you see as an example for your own startup entry but be very carefull not to use a number sequence that already exists in the list.
Files without a path are assumed to be in the system path at either \i386 or \i386\system32, system32 is the normall choice.

RUNHIDE can be used (as you will see in the examples given) to run a cmd script to do what ever you need and remain hidden at the same time. Be sure to add your startup items at the end of the list (higher runonce number) so you dont end up breaking the boot sequence.


GOOD LUCK
SA-ITGuy
QUOTE(hilander999 @ Jun 26 2007, 01:45 AM) *
The startup sequence is a little different since the release of 3.0.

take a look at the oem1\environment plugin and scroll to the very end of the file.
There you will find a complete listing of all the runonce entried used ins the current release.

Use what you see as an example for your own startup entry but be very carefull not to use a number sequence that already exists in the list.
Files without a path are assumed to be in the system path at either \i386 or \i386\system32, system32 is the normall choice.

RUNHIDE can be used (as you will see in the examples given) to run a cmd script to do what ever you need and remain hidden at the same time. Be sure to add your startup items at the end of the list (higher runonce number) so you dont end up breaking the boot sequence.


GOOD LUCK



Hmm... thanks guys.
I've actually gone down both these routes before, neither with any success. I'm going to give it another try though, figured that after it didn't work the last time it may have been version specific (for example there is no "environment.inf" file, but instead "environment-settings.inf" etc.)
You both appear quite sure this can be done.
I think where i'm going wrong though is the scope of where all to make these changes. Simply creating and autorun_* file or even just editing the environment file doesn't appear to do it. In both cases it seems you have to edit the INF files of the plugins and then some other minor tweaks.

Some time later....

I tried following this example, adding it to environment so it looks like the MyInfo entry (with the next number in the queue) and i edited the inf file for the plugin its using (a2free) and ran it... absolutely no reaction.
No additional entry in the Run-Once list, no autostarting application nothing.

What i'm doing now is i've cleared out ALL the content of the Environment-settings.inf just to see if i can cause it to do something diferent. I'm starting to wonder if its even seeing my changes i'm making.

No chance that perhaps someone could tell me (for either method listed here) the full steps required? Neither of these appear as simple and straightforward as implied by the forum posts or help files.

Really desperate here guys. surrender.gif
Thanks.
SA-ITGuy
Just an update,
I tried deleting my Environment files (or rather the content there of) and thankfully got an error message.
That would be the first bit of feedback that what i'm doing is actually making a diference.
So the files and locations i'm working in certainly appears to be the correct place to be doing it, unfortunately however none of the changes i have made yet appear to be any bit closer to having an application autostart after booting up....
Still trying though.... glare.gif
bengt
just made a quick test run
this will do it I think, it will start the program but will not auto scan

Add to av7pe.inf:

[SourceDisksFiles]
autorun0_av7pe.cmd=2,,1


[Software.AddReg]
;AV7PE.cmd
0x1,"Microsoft\Windows\CurrentVersion\RunOnceEx\1000","","Start AV7PE"
0x1,"Microsoft\Windows\CurrentVersion\RunOnceEx\1000","1","RunHide autorun0_av7pe.cmd"

-----------------

create new .cmd file: autorun0_av7pe.cmd, put in AV7PE folder

@echo off
title Starting AV7PE
cd programs\AV7PE
start AV7PE.cmd
exit

other members can probably make a more elaborate .cmd for you
SA-ITGuy
QUOTE(bengt @ Jun 26 2007, 01:51 PM) *
just made a quick test run
this will do it I think, it will start the program but will not auto scan

Add to av7pe.inf:

[SourceDisksFiles]
autorun0_av7pe.cmd=2,,1


[Software.AddReg]
;AV7PE.cmd
0x1,"Microsoft\Windows\CurrentVersion\RunOnceEx\1000","","Start AV7PE"
0x1,"Microsoft\Windows\CurrentVersion\RunOnceEx\1000","1","RunHide autorun0_av7pe.cmd"

-----------------

create new .cmd file: autorun0_av7pe.cmd, put in AV7PE folder

@echo off
title Starting AV7PE
cd programs\AV7PE
start AV7PE.cmd
exit

other members can probably make a more elaborate .cmd for you



Hey,
I actually just managed to get Av7 to boot! clapping.gif

Very similar to the code offered by Bengt over here but funny enough slightly simplified.

My autorun_AV7.cmd contains just :
"x:\programs\AV7PE\AV7PE.cmd SecurityTypes=None RemoveWallpaper=true"
(This file is in my "C:\UBCD4Win\oem1\autorun" folder and my "C:\UBCD4Win\plugin\AntiVirus\AV7PE", not actually sure which or if both did the trick, but i'm not willing to change it now!)

Added "AutoRun_AV7.cmd=2" under the [SourceDisksFiles] of av7p.inf

I think that was all i did really. I've done so much hacking/editing/copying though i could be mistaken and may have left a part out though.
Funny thing though, i got AV7 to autorun and then made the same setup for A2Free, now A2Free starts up and AV7 doesn't? Looks as if perhaps it doesn't want to start both apps. Haven't put too much further testing there yet though as i'm now trying to get AV7 and A2Free to run scans on startup and not just open the app.

If anyone has any feedback on this it would be great. From what i've read though (http://www.ubcd4win.com/forum/index.php?showtopic=4181&st=0) it involves extracting the exe, changing the ini, and putting it all back together again so that it still extracts simply by being run (currently tries to open a prompt for where to save etc), thats what i'm busy with at the moment anyway.

I've got to say though, the autostarting thing could really be better documented, hopefully my post here will help some others with similar issues in future though (or even me if i end up with the same issue again!)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.