3 Replies - 1867 Views - Last Post: 13 August 2009 - 02:58 PM Rate Topic: -----

#1 redhotfire0  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 210
  • Joined: 13-July 09

system can not find file specified

Posted 13 August 2009 - 10:01 AM

#include <stdio.h>
#include <laptop.h>

int main()
{

	int x;

	printf("\t\t\t\t***********************\n");
	printf("\t\t\t\t*****  Welcome ********\n");
	printf("\t\t\t\t**You know what to do**\n");
	printf("\t\t\t\t***********************\n");

	printf("Mount or Dismount: ");
	scanf("%d", &x);
	if ( x == 1)
{	
	system("truecrypt /v \Device\Harddisk0\Partition4 /l z /c n /q");
	decision();

}
	else
		{
	system("truecrypt /d /f /q");
		coverUp();
		}

	return 0;

}



My problem is that when I run truecrypt.exe it pops up the password box but when inputted, it says system can not find file specified, because when I try to launch '\Device\Harddisk0\Partition', it makes it located under the directory the file is in. But in a batch, it just runs in '\Device\'. I tried using chdir() but I do not know the directory needed for a partition to be mounted. I used a system() call because you drop the executable into C:\WINDOWS, making it valid syntax. If my header is needed, which it most likely isn't because I have a problem mounting before going to my decision() function, I will post it. I do not know if I should bring this to the TC forums or here seeing as I am doing it in C.

Is This A Good Question/Topic? 0
  • +

Replies To: system can not find file specified

#2 horace  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 768
  • View blog
  • Posts: 3,832
  • Joined: 25-October 06

Re: system can not find file specified

Posted 13 August 2009 - 10:40 AM

View Postredhotfire0, on 13 Aug, 2009 - 04:01 PM, said:

My problem is that when I run truecrypt.exe it pops up the password box but when inputted, it says system can not find file specified, because when I try to launch '\Device\Harddisk0\Partition', it makes it located under the directory the file is in. But in a batch, it just runs in '\Device\'. I tried using chdir() but I do not know the directory needed for a partition to be mounted. I used a system() call because you drop the executable into C:\WINDOWS, making it valid syntax. If my header is needed, which it most likely isn't because I have a problem mounting before going to my decision() function, I will post it. I do not know if I should bring this to the TC forums or here seeing as I am doing it in C.

try using \\ rather than \
	system("truecrypt /v \\Device\\Harddisk0\\Partition4 /l z /c n /q");


Was This Post Helpful? 0
  • +
  • -

#3 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 421
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: system can not find file specified

Posted 13 August 2009 - 12:50 PM

Renamed topic to be more descriptive of the problem.
Was This Post Helpful? 0
  • +
  • -

#4 redhotfire0  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 210
  • Joined: 13-July 09

Re: system can not find file specified

Posted 13 August 2009 - 02:58 PM

View PostJayman, on 13 Aug, 2009 - 11:50 AM, said:

Renamed topic to be more descriptive of the problem.

Thank you, I will try adding the extra \.

Thanks,
red

Edit: I tried the extra \ and it worked. Thanks for helping.

This post has been edited by redhotfire0: 13 August 2009 - 03:02 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1