Jump to content











Photo
- - - - -

Script for Testdisk


  • Please log in to reply
8 replies to this topic

#1 al_jo

al_jo

    Gold Member

  • Members
  • 1218 posts
  • Location:Tellus

Posted 21 January 2011 - 08:19 PM

Homepage:
http://www.cgsecurit...g/wiki/TestDisk
 

Tested and working in these projects:

http://aljo.comeze.c...Eavirguide.html

http://aljo.comeze.c...in8PEguide.html

 

Download here:

http://aljo.comeze.com/testdisk.script



#2 ito pedalracer

ito pedalracer

    Member

  • Members
  • 35 posts
  •  
    Barbados

Posted 01 June 2011 - 03:40 PM

Dear Al Jo

I am still a beginner but I can read scripts. At least I can open them :dubbio:

What I do not know until now and didnt find in the help section for app scripts
is where I put my actual files. In this case I got the TestDisk_win.zip.

By intuition I extracted it into

... \Winbuilder\Workbench\Common\TestDisk\


Since I got my shared app folder and the share app script (winpeFe)
I could save your script there and WinBuilder finds it.
\Winbuilder\Projects\MyScripts\APPS\File Tasks\

But on building it tells me it can not find the executable.



How come?
What can I do?
where shall I put the testdisk exe etc.?
How could I have found the solution myself?


thanks :cheers:

#3 al_jo

al_jo

    Gold Member

  • Members
  • 1218 posts
  • Location:Tellus

Posted 01 June 2011 - 05:18 PM

Just put the script in:
\Projects\Win7PE_SE\Apps\System



#4 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 01 June 2011 - 05:31 PM

I am still a beginner but I can read scripts. At least I can open them :cheers:

I'll assume you are using WB to actually open and look at the script, and not just an editor like notepad :dubbio:

The reason for that is that a script has the ability to have embedded / encoded files and folders. Often, this is where the files would be located.

What I do not know until now and didnt find in the help section for app scripts
is where I put my actual files. In this case I got the TestDisk_win.zip.

That is what is happening here. You don't need to go get the files and put them anywhere! This is a philosophical point - is it better to embed the binarys inside the script making it be "one stop shopping", or is it better to have a generic script that has a built in way to go get it over the internet, and also update itself as needed? Not only are their pros and cons to each, there is sometimes the issues of copyright and "license" (distribution rights).

For example the popular "Sysinternals" tools (now part of Microsoft) have always had a "license" that prohibited anyone from redistributing their code. In that case, to be compliant (legal), you had to have the end user do the download from their server, so a process that used the workbench area to cache the file was required.

But back to how you edit the script - Just click on the icon in the winbuilder interface! Then you see a tabbed view, where you can look at the interface editor, the description, source, options and Attachments (the one we need to look at here). Al-Jo has attached the files directly to this script.

...on building it tells me it can not find the executable.

How come?
What can I do?
where shall I put the testdisk exe etc.?
How could I have found the solution myself?

Well, now we get down to the main issue...If the files are attached, AND you still had issues, then there is some other problem...For that, a log file of the processing could help. For debugging, I usually run the process, and un-select everything after the failed script. That way I can (most of the time) run the script several times to debug things. (An aside to Al-Jo...good to mark this as WIP, but we also have the development area which specifically calls out that is is the place for scripts under development)

But, I also notice that there are several files embedded inside the script that seem out of place. For example, there is an embedded copy of a different testdisk script, as well as some BartPE things ????? But, let's get back to how you could approach this...

I turned on debugging output in the log file as well as asked it to echo original lines...

For me (using Win7PE_SE), it worked FINE...Let's look at the script as well as the files attached...

In line 21, he starts UNPACKING files (after creating shortcusts)...This means to get them from the attached folders! - Hint a good place to also help in reading scripts is the wonderful helpfile! (search forum for a LOT more on it!)...

So, I think the script is working as expected - just not sure what the purpose is, other than it is MUCH better than the script inside it!

After looking at that script, maybe that is your problem???

[process]

StrFormat,path,%scriptdir%,%one_folder_up%

StrFormat,CTrim,"%one_folder_up%","\",%one_folder_up%

StrFormat,path,%one_folder_up%,%two_folders_up%

StrFormat,CTrim,"%two_folders_up%","\",%two_folders_up%

If,NotExistFile,"%two_folders_up%\testdisk_win.exe",Run,%ScriptFile%,Halt

The process section of that script is fairly limited, since it ASSUMES that the file is located "two folders up", and it does that by trying to take the script folder and parse backwards, stripping thigns off at a "\". Not sure this would work with links, and even if it did, it certainly wouldn't find the file inside the workbench area.

Finally, If in fact, this was the case, it would have told you more in the "halt" message, which prints out the filder it was looking in...

So, not sure what your problem is - maybe a log file would help out (if this doesn't get you pointed in the right direction)...

#5 al_jo

al_jo

    Gold Member

  • Members
  • 1218 posts
  • Location:Tellus

Posted 01 June 2011 - 05:44 PM

@Sbaeder
Don’t remember, it was 5 month ago, how I did or why I did it that way.
But, for sure it is working in all projects!
Will have a look tomorrow if it’s possible to clean it up a little bit…


@Ito
You should try with this project:
http://reboot.pro/14...616#entry129616
Testdisk is included.
Don't change anything, just extract, start Winbuilder.exe, point to your source and click play!

 



#6 al_jo

al_jo

    Gold Member

  • Members
  • 1218 posts
  • Location:Tellus

Posted 02 June 2011 - 07:17 AM

There is a new beta version here:
http://www.cgsecurit...stDisk_Download

The script for that version is here:
http://al-jo.zxq.net/testdisk613wip.7z



#7 ito pedalracer

ito pedalracer

    Member

  • Members
  • 35 posts
  •  
    Barbados

Posted 06 June 2011 - 10:46 AM

Sorry for my late answer but our baby is very clumsy at the moment :cheers:

So,

I followed your long und detailed explanations and thank you very much for them!

However, before I tried to get things straight I tried the new x.13 script and voila it works.


Thanks again for all the great scripts, your help and the superb PE FF project.

#8 darthyoda6

darthyoda6
  • Members
  • 5 posts
  •  
    Canada

Posted 09 June 2011 - 04:36 PM

I downloaded yesterday and the link worked for the script, but today it's not working.

#9 al_jo

al_jo

    Gold Member

  • Members
  • 1218 posts
  • Location:Tellus

Posted 09 June 2011 - 04:46 PM


I downloaded yesterday and the link worked for the script, but today it's not working.



It's here now:
http://www.mediafire...slhpcy78m0av6l4


 




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users