Help - Search - Members - Calendar
Full Version: Curious about RE/PE options
The CD Forum > The CD Forum > Windows PE
timesurfer
Hello, I am trying to do some RE cmds without actually entering login info and clicking cmd prompt. I've already gotten comp to restart and boot into RE with this cmd

CODE
reagentc /boottore >NUL


And a way out of RE automatically with this cmd

CODE
echo wpeutil reboot


I'm just looking for help to do the stuff in between to automatically do login on info and open cmd and do simple cmd

I heard from my friend this is very hard since a PE image can be huge in size and and thus undesirable to put into simple 1mb program

I wish there was a way to record the data entered through the missing process I'm trying to accomplish. Like in task scheduler you have an export to save task

OR maybe somehow edit the RE image. I dunno

So basically say put a bat file in c: then thats what cmd runs in RE that can't in windows instead of entering lots of cmds just enter bat name with lots of cmds in it.

Just being creative with more automation

Any idea's

Thank you
jaclaz
What do you mean by "RE"?
Recovery Environment?

Which OS?

Windows 7 ?:
http://technet.microsoft.com/en-us/library...242(WS.10).aspx

If yes that would be a PE 3.x (just in order to disambiguate).

I cannot understand the actual goal, can you try detail it a bit more?

Cannot say if these would help you or even if they are at all related, anyway have a look:
http://www.boot-land.net/forums/index.php?showtopic=3806
http://www.boot-land.net/forums/index.php?showtopic=5917


jaclaz
Ed_P
QUOTE (jaclaz @ Jun 20 2010, 06:15 AM) *
What do you mean by "RE"?

QUOTE (http://technet.microsoft.com/en-us/library/dd799242(WS.10).aspx)
Windows® Recovery Environment (Windows RE) is an extensible recovery platform based on Windows Preinstallation Environment (Windows PE).

News to me also.
jaclaz
QUOTE (Ed_P @ Jun 20 2010, 01:13 PM) *
News to me also.


Well, for the record it wasn't news to me. wink.gif
http://www.911cd.net/forums//index.php?showtopic=20318

The point was that RE can be both from Vista ph34r.gif and from Windows 7, i.e. PE 2.x vs. PE 3.x, that though similar have a number of differences, including the availability of reagentc.



jaclaz
timesurfer
QUOTE (jaclaz @ Jun 20 2010, 06:15 AM) *
What do you mean by "RE"?

I cannot understand the actual goal, can you try detail it a bit more?


Thank you for your reply. In windows 7 at boot when you usually press f8 to get into recovery mode we sometimes do cmds to say fix mbr, etc...

All my post was about was how to automate language and logon entry as well as open cmd prompt automatically and execute bat file that sits in c:\. I am so close but don't know how to proceed? Like I stated I can from inside windows restart into RE then after cmds are done it will restart without me actually restarting.

So I was curious in this forum and thread how to accomplish this.

It is a nice consideration while working on many comp stuff to not have to attend the whole process but to have it automated as to just put the fils with whatever cmds in bat file and inside that bat file have the reboot in RE and exit from RE cmds but the other I cannot do

Thank you for your time and consideration. Hope this is possible without too huge a image or program to add to the bat being run from RE

later
jaclaz
I guess you mean adding commands to Startnet.cmd:
http://technet.microsoft.com/en-us/library...284(WS.10).aspx
QUOTE
When Windows PE boots, Winpeshl.exe executes the Startnet.cmd command script, which launches Wpeinit.exe.

(or use Winpeshl.ini or Unattended.xml, though i think that Startnet.cmd is more handy):
http://technet.microsoft.com/en-us/library...521(WS.10).aspx

jaclaz
timesurfer
QUOTE (jaclaz @ Jun 20 2010, 01:05 PM) *
I guess you mean adding commands to Startnet.cmd:
http://technet.microsoft.com/en-us/library...284(WS.10).aspx

(or use Winpeshl.ini or Unattended.xml, though i think that Startnet.cmd is more handy):
http://technet.microsoft.com/en-us/library...521(WS.10).aspx

jaclaz


Do you care to help me as I'm not that good at this stuff. I mostly do GUI's...lol

Meaning how to start to organize this into a script with the two cmds I posted earlier to automatically reboot into RE and then automatically exit. We can make any bat file with any cmds that only work in RE to be executed

like

CODE
Bootrec.exe /FixMbr
Bootrec.exe /FixBoot
Bootrec.exe /RebuildBcd
Bootsect.exe /nt60 all /force


So we put that into c:\ then with appropriate cmds from windows it reboots into RE and does logon, etc and open cmd prompt then those cmds runs

It's a simple way to do RE "only" cmds by just clicking the bat file then it restarts does it stuff and ends up back at widows logon

I could create several of them for many things as to not have to remember cmds nor restart. So it's completely unattended

I guess I'm concerned how small this would be in file size. Is there a way to make it very small
jaclaz
It seems to me that there are still some misunderstandings.

The thing is binary, ON/OFF or 1/0, you EITHER:
  1. are there to click on anything (including the set of .cmd files you are talking about)
    OR:
  2. are NOT there

If #1 it is NOT unattended, it is attended.
If #2 it is UNattended allright.

Don't worry about filesize, a simple batch is exactly as long as the number of characters you type in it (+ maybe a few CR/LF's).

But still I miss WHAT you want to do.

A simple snippet to add to Startnet.cmd:

CODE
ECHO Hello World!
PAUSE
ECHO Bootrec.exe /FixMbr
ECHO Bootrec.exe /FixBoot
ECHO Bootrec.exe /RebuildBcd
ECHO Bootsect.exe /nt60 all /force
PAUSE


jaclaz
timesurfer
QUOTE (jaclaz @ Jun 20 2010, 02:44 PM) *
It seems to me that there are still some misunderstandings.
But still I miss WHAT you want to do.


Thanks I'll try to explain again

I want to do cmd in RE that executes bat in c:

I can't do this in windows

So I wish to automate doing cmd in RE instead of having to manually login and open cmd prompt and type name of bat to run

I hope that makes sense

I already have way into RE and out of RE automatically

And since the bat in c: would contain everything (RE cmds, restart into RE, exit from RE) it would be nice for the PE/RE image to be small

Thank you
jaclaz
Good, as I already pointed you to, when a RE boots:
http://technet.microsoft.com/en-us/library...521(WS.10).aspx
it executes AUTOMATICALLY:
  1. Winpeshl.ini, which is (loosely) a .ini type of file, i.e. you can ONLY make it point to another executable or .bat/..cmd BUT cannot add to it "normal" batch commands
  2. StartNet.cmd, which is a "normal" .bat/.cmd batch file to which you can add ANY "normal" batch command
  3. Unattend.xml, which is a stoopid, overcomplex, bloated file format, mostly undocumented or poorly documented, that MS introduced probably rant.gif just for the fun of making life of old "dinosaurs" like me a little tougher w00t.gif and that i won't discuss wink.gif


So, WHAT is the problem now?

Startnet.cmd resides in %SYSTEMROOT%\System32 you can add to it all the command lines you need, as already said.

Or do you really *need* that your batch file to be in C:? (which I take as being the actual SystemDrive, NO matter which letter is assigned to it)

If this is the case, add to StartNet.cmd a line like (supposing your batch is named mybatch.cmd):
CODE
IF EXIST %SystemDrive%\mybatch.cmd START  "A_Title" /WAIT %SystemDrive%\mybatch.cmd


http://ss64.com/nt/start.html

jaclaz


timesurfer

Thank you I used winpeshl.ini and it worked

Appreciate your time and helpfulness
sorcerer.gif
jaclaz
QUOTE (timesurfer @ Jun 20 2010, 09:39 PM) *
Thank you I used winpeshl.ini and it worked

Appreciate your time and helpfulness

Only too happy there is now another happy bunny in the basket:
http://www.msfn.org/board/index.php?showto...28727&st=10
smile.gif

jaclaz
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-2013 Invision Power Services, Inc.