Page 1 of 1

Automate Restore Script

Posted: Wed Nov 05, 2014 8:55 pm
by UkiwiS
I'm a newbie and I've struggled for some time to get to where I've almost have an automatic restore script.

Here's my script that I'm using with an IFL bootable USB stick:

sub main()
exec("/tbu/imagel --r --d:l0 --f:l1@0x1:^"/image/image^"", 1)
end sub

Now, when I boot off my Custom created Bootable USB stick I get a warning "Are you sure you want to continue (Y/N)"

I click YES and all is good, the image deploys and I'm good to go but is there a way to have the script answer the prompt?

Also, is there a way when it's finished to display a prompt like "Image deployment completed, please remove the stick and hit enter to reboot"?

TIA
KIWI

Re: Automate Restore Script

Posted: Wed Nov 05, 2014 9:02 pm
by Brian K
KIWI,

This will fix your first issue.

sub main()
exec("/tbu/imagel --r --uy --um --d:l0 --f:l1@0x1:^"/image/image^"", 1)
end sub

You could try this...

sub main()
exec("/tbu/imagel --r --uy --um --d:l0 --f:l1@0x1:^"/image/image^" --rb:4", 1)
end sub

As soon as the restore commences pull out the UFD and go and have a beer. When you return you will be in restored Windows.

Re: Automate Restore Script

Posted: Wed Nov 05, 2014 9:25 pm
by UkiwiS
Hi Brian

Thanks for the prompt response and thanks very much for your help.

The second option gets me into a loop since the image is on the stick and will keep looping if I'm not keeping an eye on it.

If it's possible, I'd like to prompt the user with instructions on what to do...such as. Remove stick, click yes to reboot, that sort of thing. Is it doable?

Cheers
KIWI

Re: Automate Restore Script

Posted: Wed Nov 05, 2014 9:39 pm
by Brian K
UkiwiS wrote:
>
> The second option gets me into a loop since the image is on the stick and
> will keep looping if I'm not keeping an eye on it.
>

KIWI,

Do you have the BIOS Boot Menu set so the HD boots before the UFD? You access the UFD from the Boot Menu? If so, use the second script and leave the UFD plugged in. After the restore completes Windows will boot.

Re: Automate Restore Script

Posted: Wed Nov 05, 2014 10:28 pm
by UkiwiS
Ah yes, I forgot that some time ago I changed this option to boot off the USB. I set it back to the HD and all is good. Thanks again.

Re: Automate Restore Script

Posted: Wed Nov 30, 2016 6:10 am
by angellily
Hiiii
thanks for share.
best regards
angellily