Automate Restore Script

User discussion and information resource forum for scripting of TeraByte products using script lanugages such as TBScript, VBScript, Batch Files, and more.

Automate Restore Script

Postby UkiwiS » Wed Nov 05, 2014 1:55 pm

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
UkiwiS
 
Posts: 12
Joined: Tue Apr 29, 2014 9:40 am

Re: Automate Restore Script

Postby Brian K » Wed Nov 05, 2014 2:02 pm

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.
Brian K
 
Posts: 1175
Joined: Thu Aug 11, 2011 6:11 pm

Re: Automate Restore Script

Postby UkiwiS » Wed Nov 05, 2014 2:25 pm

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
UkiwiS
 
Posts: 12
Joined: Tue Apr 29, 2014 9:40 am

Re: Automate Restore Script

Postby Brian K » Wed Nov 05, 2014 2:39 pm

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.
Brian K
 
Posts: 1175
Joined: Thu Aug 11, 2011 6:11 pm

Re: Automate Restore Script

Postby UkiwiS » Wed Nov 05, 2014 3:28 pm

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.
UkiwiS
 
Posts: 12
Joined: Tue Apr 29, 2014 9:40 am

Re: Automate Restore Script

Postby angellily » Tue Nov 29, 2016 11:10 pm

Hiiii
thanks for share.
best regards
angellily
angellily
 
Posts: 5
Joined: Tue Nov 29, 2016 10:58 pm


Return to Scripting

cron