Commandline for testdisk_win

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Post Reply
Message
Author
PPCP
Posts: 2
Joined: 31 Oct 2016, 16:29

Commandline for testdisk_win

#1 Post by PPCP » 31 Oct 2016, 16:40

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

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 4387
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Commandline for testdisk_win

#2 Post by cgrenier » 01 Nov 2016, 08:30

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.

Post Reply

Who is online

Users browsing this forum: Google Adsense [Bot] and 4 guests