Topic: RestoreMyPC Beta Test  (Read 4277 times)

0 Members and 1 Guest are viewing this topic.

RestoreMyPC Beta Test
« on: June 03, 2013, 11:19:49 AM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
New Version RestoreMyPC v.3 posted under new topic. http://theoven.org/index.php?topic=650.0

Many improvements, no extra files or folders to deal with, all files compiled into plugin.
Fully automated the recoverype image creation and imported directly into Win7PE.
Cleaned up the clutter of excess files in root off recovery partition.

I will leave this post as is for any one who wishes to modify the program.
RestoreMyPC v.2 was created with Basic HTA, VBS and Batch script all written in notepad.
Should be easy to modify to suite your own needs. Creation of this program and
posting it so others could use and understand was a huge learning experience for me.
I hope others can learn from my experience also. I really like this forum and the laid back
attitude of everyone involved.
To quote Lancelot "Don't stress take your time do your homework and have fun."

If your looking for a fully functional easy to install recovery option, please use the new version.
______________________________________________________________________________
 
I would like to thank Lancelot for his advice (HE answered a lot of my dumb questions).

RestoreMyPC is a hard drive based recovery partition using imagex to create a backup image.
This is fully automated ,just a few clicks of the mouse, process to restore your original Windows configuration.
It should Not be used as a full backup option on a machine that has been running for any length of time.

The zip contains a couple plugins a small files folder and 4 text files. the text files are setup guides.

1st off RecoveryPE settings.txt and Hard Drive setup.txt explain the process I used and are not really
necessary unless you wish to set up your hard drive manually. (These  2 are a little long winded)

Automated setup.txt is a guide to setup Your Win7PE to automate the partioning and instalition process.
Using RestoreMyPC.txt is just that a short and simple users guide.  (These 2 are short and sweet)

ATTENTION:  If you downloaded previous version there was a problem booting the recovery partition.
                    " Build Model must be set to NORMAL". I've updated the Automated Setup guide and ScriptManager.ini.
                     Uploaded new version and it should work now.

* RestoreMyPC_v.2.7z (1544.08 kB - downloaded 160 times.)

I think my guides are pretty thurough and I hope I didn't miss anything.
Good Luck testing
trashy

PS: I'm suprised no one else mentioned the boot problem,caught it myself testing.
« Last Edit: June 12, 2013, 12:22:17 PM by trashy »

Re: RestoreMyPC Beta Test
« Reply #1 on: June 03, 2013, 11:53:39 AM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
I have a rather important question, something I just noticed.
Looking at some of my VB Scripts, sometimes I used X:\blahblah and sometimes %systemdrive%\blahblah.

I do everything from USB, haven't used a cd since BartPE, no wim all files exposed.
The Program File points to a vbs or bat in the root of system drive or X: (no difference). In the 2nd part
The automated process from Win7PE I'm worried about some one running a wim packed cofig or from CD.
Which command would be best to use or does it matter?

Re: RestoreMyPC Beta Test
« Reply #2 on: June 03, 2013, 02:58:09 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1972
Thanks for posting. I'm sure this will be helpful for others, or to get ideas as well.

To be safe, always use environment variables when you can.

Regards,
Galapo.

Re: RestoreMyPC Beta Test
« Reply #3 on: June 03, 2013, 06:15:24 PM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
I thought so but I wasn't sure. This was my first attempt at anything like this.
I really can't write script but I can look at one understand it and modify to suit
my needs. With no previous experience what started as a few simple batch files and
a couple months of online research and testing this is what I ended up with.

Setup on a few friends and familys computers with good results and decided to share.
Hope that someone will modify and repost or give me ideas on how to improve.
Haven't tested on x64 but I believe it should work as is.

What I would really like to learn to do is wrap all this into a single HTA.
Lancelot suggested AutoIT and I just took my first look.

Good luck with it and let me know what your results are.
By the way you guys and this forum are awesome, thanks for the help.

Re: RestoreMyPC Beta Test
« Reply #4 on: June 03, 2013, 06:20:42 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1972
Yep, I like AutoIt too. It is a very easy scripting language.

I taught myself how to use it, without having any prior programming knowledge. The way I learnt was simply needing a program to do something and reading the help file to accomplish it. For complex stuff there are the forums, which have code snippets and so on. I've posted there a little over the years for help with things and someone has always been able to help.

Regards,
Galapo.

Re: RestoreMyPC Beta Test
« Reply #5 on: June 05, 2013, 01:08:54 AM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
AutoIT language looks very similar to what I've been doing and easy to understand.
Found a sample script and started modifying it.

Converting the initial hta to autoit.3 button msg
Buttons labeled "Quick Format" "Full Format" and "Exit"

Testing in Windows this works fine.
 Case $msg = $Button_1
                Run('cscript.exe diskpartq.vbs')
Autoit script in the root of system drive along with vbs.

Would not work in PE
I tried   Run('cscript.exe "X:\diskpartq.vbs"')
also tried    Run('cscript.exe "%systemdrive%\diskpartq.vbs"')
The cmd window opens and close and nothing happens.
I would prefer doing this without using cscript, did an online search
but couldn't find any other option.

Tested again in full Win7PE build and it worked.
Won't work in minimal (recoverype ) build.
Has to be some thing to do with cscript and Win7PE build options.
« Last Edit: June 05, 2013, 01:25:53 AM by trashy »

Re: RestoreMyPC Beta Test
« Reply #6 on: June 05, 2013, 02:16:47 AM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
Added powershell to recoverype build and that solved the problem.
would still like to know if there's a way accomplish this without cscript.

Here's another  RunWait(@ComSpec & " /c " & "diskpartq.vbs")
What I'd really like to do is hide the black cmd window.
« Last Edit: June 05, 2013, 09:25:16 AM by trashy »

Re: RestoreMyPC Beta Test
« Reply #7 on: June 07, 2013, 02:24:46 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7261
to hide batch/cmd window, we have hiderun.exe which is quite popular to hide cmd batches ;)

you need to use this at somewhere on your plugin
If,Not,ExistFile,%target_sys%\hiderun.exe,FileCopy,%Tools%\%SourceArch%\hiderun_%SourceArch%.exe,%target_sys%\hiderun.exe

it is generally used with /w switch to wait untill process finished (what you do with RunWait)
ex to test on your pc:
hiderun.exe /w "blabla.cmd"



To have a demonstration:
create Test.cmd
Code: [Select]
Echo Trashy
pack to Test.7z
Utils\"PC Packed"
1) ... Test.7z
2) Test.cmd
Enable->Add Startup Option
Enable->Hide
3) Gooo

On plugin, enable Startup option ....


Test.cmd will run at startup without any cmd seen ;)
--> this well demonstrates use of hiderun.exe inside plugin, which is very easy and automated to get easier, rest is read & understand

to compare and see how it is added to plugin, you can recreate by Disable->Hide and see cmd screen at startup
ps: with comparision, only 1 line added (above) and 1 line changed (shortcut parameter to use hiderun)

After you figure out with a bit of work on learn curve , you will see it is very easy to implement hiderun.exe to hide for whatever reason (startup or general or...)  :wink:

Aside startup tasks, Time to time I also use on some applications that I like to run with a batch due to some reasons,
 I am sure you will easly figure out to create shortcuts with hiderun after a good short study  :thumbsup:

:turtle:

Re: RestoreMyPC Beta Test
« Reply #8 on: June 07, 2013, 06:38:21 AM »

JonF

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2011
  • Posts: 286
Here's another  RunWait(@ComSpec & " /c " & "diskpartq.vbs")
What I'd really like to do is hide the black cmd window.

RunWait(@ComSpec & " /c " & "diskpartq.vbs",EnvGet("Temp"),@SW_HIDE) should do it

Re: RestoreMyPC Beta Test
« Reply #9 on: June 07, 2013, 08:49:16 AM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
Spent about 3 days tinkering with AutoIT. I've got a good start on a program interface but it's turning out
to be more of a challenge than I expected. Still haven't looked at PC Packed. I've been using Make Script
to get my basic plugin configuration and editing the plugin manually.

I"ve got a big construction project coming up soon and I'm running out of time.
Once I start I won't have much free time, and I wanted to finish this first.

I spent about half a day with VB Express and created a new program interface for RestoreMyPC.
Compiled all my vbs files into 1 program completely eliminating the clutter in the root of systemdrive.
Just started on the 2nd half of the process, automating the hard drive partitioning and setup.

What I don't like about VB is it's dependancy on netframework full install adds 250 to 300 meg to PE build.
The VB program interface is very simple and the script language is almost the same as vbscript.

Re: RestoreMyPC Beta Test
« Reply #10 on: June 07, 2013, 12:26:44 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7261
Make Script is very old and deprecated for a long while now (not sure, 3 - 4 - 5 years .....),
 I've never use it to create plugins but it may also be misleading due to syntax changes,
  besides, as far as I remember from old plugins that are created with it, it was causing slow down due to its not packing into single file, especially when there are too many files......

PC Packed is full and works much more straight forward and much more easier with only 3 steps which adds plugins directly & safely to project without any more manual step  :great:
Most Apps plugins you will find around mostly created with PC Packed or reorganised following PC Packed organisation to fit a general template to read easier...

+
Yes, because of "these" big dependencies hiderun.exe, batches/cmd and AutoIT prefered widely :wink:
Generally, when there is a limitation what you can do with batches/cmd,
 than very mostly AutoIT used....
   I feel you can learn AutoIT very easly with your experience so far  :great:
    Else you can add big/small dependencies, choice is yours  :thumbsup:

Only one thing I ask you,
For such plugins that requires *special dependencies, write a text to your plugin interface like
".Net2 required"  :wink:

:turtle:

Re: RestoreMyPC Beta Test
« Reply #11 on: June 07, 2013, 07:34:42 PM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
In previous version noted IE and C+ dependencies in my text guide didn't think to note in plugin Interface.
Using make script long time building for livexp, don't encode large files in plugin (because it is so slow) copy
from source. Running Win7 for less than 2 years and win7PE SE has a lot of built in tools and utilities that
I've ignored for too long.

Finished 2 new programs for RestoreMyPC and automated setup from Win7pe. Compiled most files into new
program and cleaned up a lot of the clutter. Need to test everything once more before I post.
Need to rewrite and simplify tutorial, but should be a slick program and easy to setup.

Should have time this weekend to check out PCPacked after that will have very little free time for a while.
Thanks very much for all your help.
Tom

Re: RestoreMyPC Beta Test
« Reply #12 on: June 08, 2013, 02:40:57 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7261
don't encode large files in plugin (because it is so slow)
Yep, as mentioned this is fixed (workarounded ;)) with PC Packed,
still for undistributables, and some other cases, folder source is also used...

Here you can find some syntaxes
http://theoven.org/index.php?topic=45.0
"Open Dir" button useful on plugins that requires files
Call,OpenDir,<Path>

also
Call,StartDoc,<File>
is useful to open .txt / .html files for Long instructions
(.txt / .html file extracted to temp and opened with this syntax)


As a long term user, Maybe you can share some more of you plugins in time  :thumbsup:
 Maybe on a topic "Trashy Plugins"  :wink:

Should have time this weekend to check out PCPacked after that will have very little free time for a while.
in maximum 5 minutes, you will figure out  :cool:
 Than you can create some hundereds of plugins with PC Packed in a day  :lol:

win7PE SE has a lot of built in tools and utilities that I've ignored for too long.
Discovery is quite fun to spend some time,
 and would gain big time on development without inventing that is already invented  :wink:


Have fun

:turtle:

Re: RestoreMyPC Beta Test
« Reply #13 on: June 08, 2013, 11:04:20 AM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
Added this command to my plugin "FileCopy,%Tools%\%SourceArch%\imagex.exe,%TargetDir%".
Without modifying this cmd will copy the appropriate imagex according to build source.
x86 source it copies x86 imagex, x64 source it copies x64 imagex. I understand FileCopy, DirCopy,
environment variables can be a little tricky. 

With Make Script all files encoded in plugin (not packed in zip) included a folder "To_TargetDir" 6 files inside
this folder would be extracted to target directory RestoreMyPC.exe extracted to Program Files.
Sample plugin shows what I'm talking about * RestoreMyPC.Script (370.68 kB - downloaded 146 times.)

Is there any way to accomplish this with PC Packed without using FileCopy from an external source
The ability to extract files encoded in plugin to multiple locations. Main program.exe to program files
and extra files that may need to go to TargetDir or WinDir or system32 etc...

Another option would be to copy all files in a given directory to the root of TargetDir.
Without having to run FileCopy CMD for each individual file.
DirCopy,%GlobalTemplates%\Files,%TargetDir% copies the folder "Files" to TargetDir.

Thanks again for all your help


Re: RestoreMyPC Beta Test
« Reply #14 on: June 08, 2013, 12:12:32 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7261
I feel you write before homework,
Try PC Packed, all what you wrote above are easy tasks which all you can learn by some tests or checking existing plugins ..
PC Packed already designed to copy files to different folders if there is such a case.. , a general usage copying correct architecture driver .sys files ;)

After you practice, do some homework, you will figure out the wisdom behind PC Packed codes,
 sadly you start with Make Script, which was based on bad leadership of wb authors hiding wb bugs/facts years ago....



All projects have "Root CD" option to copy all file to targetdir, (Create ISO)
 aside you can do yourself on a plugin by simply using * on your filecopy command instead of dircopy...
    ps: check Create ISO line where Root CD option works...



Spend some time trashy, it is a verrry old school comma based syntax with being batch (not script) easy to read & follow giving a readable log,
 with available hundereds of plugins which all working having some interesting practices..

Generally, you do not need to ask questions on your above post after (If) following advices, spend some time, check things inside, see how things works, no need to rush or stress, have fun, and respect others free time  :thumbsup: ....

:turtle:

Re: RestoreMyPC Beta Test
« Reply #15 on: June 08, 2013, 04:17:19 PM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
You're right, do my own homework and respect the fact that everyone has limited free time.
FileCopy and I forgot about wildcards "*.*" a little more practice and I'll figure out the extraction process.
I'll try to restrict my posts to more worthwhile content in the future but I'm learning.
As always thanks

Re: RestoreMyPC Beta Test
« Reply #16 on: June 10, 2013, 07:53:24 PM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
RestoreMyPC v3.0 final. This is about the biggest project I have ever attempted. The final version is truelly fully
automated and simple to follow. One final test and I should be ready to post in a day or 2. Plugin created with
PCPacked, far more sophisticated than make script. Now I need to update all my old plugins.

If possible I would like to DELETE this topic and start over. Most of it is gibberish but it was a huge learning process
for me. I would like to thank Lancelot for all his advice and patience.

Re: RestoreMyPC Beta Test
« Reply #17 on: June 11, 2013, 04:05:02 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7261
No need to delete current topic, just edit your first post and open a new topic the way you like...

In anyway, this topic can also be an example to some others in future  :thumbsup:


besides I like to remind,
simply using * on your filecopy
I forgot about wildcards "*.*"
I did not wrote *.* , I wrote single * , which you will also notice on Create Iso plugin lines I mentioned as well as some others...

*
Try to follow PC Packed basic lines, it may seem sophisticated at first look but in fact it's organisation quite simple because of batch nature :wink:

Take your time, Have fun :turtle:

 

Powered by EzPortal