Page 1 of 1

Commandline for testdisk_win

Posted: 31 Oct 2016, 16:40
by PPCP
Hi all

I am trying to script runs of testdisk_win 7.0 with various disk geometries to maximize chance of data recovery (hope I'm right). So I'm calling testdisk_win inside a (C#) loop with the following command line

FILENAME='D:\UsrBin\testdisk70win64\testdisk70\testdisk_win.exe'
ARGUMENTS='/debug /log /cmd R:\someDir\diskImage.image.dd partition_gpt,geometry,C,364785,analyze,list,search,list'

I tried different format for the arguments line, but as soon as I add '/cmd', things go wrong and I get the following on stderr:

LINES value must be >= 2 and <= 0: got -18688
initscr(): Unable to create SP

Am I doing something wrong? Maybe testdisk_win does not work the same way as unix version? I'm using win7 professional with elevated privileges

Note: this is my first post, so let me thank Christophe for all the valuable files I've already recovered with photorec!

Another note: I also have problems with /logname argument, but that's mostly cosmetics

Re: Commandline for testdisk_win

Posted: 01 Nov 2016, 08:30
by cgrenier
The two error messages comes from the ncurses/pdcurses library, they are not generated by testdisk itself.
Can you try TestDisk 7.1-WIP and if it still doesn't work, try your command line in a .bat file.
Note that modifying the number of cylinders is probably useless.