Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-10-2016, 09:21
52098994 52098994 is offline
Registered User
 
Join Date: Oct 2016
Location: china
Posts: 10
Thanks: 4
Thanked 0 Times in 0 Posts
52098994 is on a distinguished road
Question How to install the directory automatically points to the Max Drive?

How to install the directory automatically points to the Max Drive?

I write this error



Reply With Quote
Sponsored Links
  #2  
Old 04-10-2016, 13:13
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,749
Thanks: 2,170
Thanked 11,206 Times in 2,307 Posts
Razor12911 is on a distinguished road
These go here
http://fileforums.com/showthread.php?t=98274
Reply With Quote
  #3  
Old 05-10-2016, 06:23
lolaya lolaya is offline
Banned
 
Join Date: Jul 2011
Location: still life
Posts: 138
Thanks: 156
Thanked 38 Times in 29 Posts
lolaya is on a distinguished road
how to copy folder to Documents auto*?

konami etc. save game ...
Reply With Quote
  #4  
Old 05-10-2016, 09:47
JRD!'s Avatar
JRD! JRD! is offline
Registered User
 
Join Date: Sep 2015
Location: Matrix
Posts: 274
Thanks: 225
Thanked 600 Times in 168 Posts
JRD! is on a distinguished road
Quote:
Originally Posted by lolaya View Post
how to copy folder to Documents auto*?

konami etc. save game ...
Please make your request in the appropriate section.
__________________
Practice makes perfect.
Reply With Quote
  #5  
Old 06-10-2016, 07:33
lolaya lolaya is offline
Banned
 
Join Date: Jul 2011
Location: still life
Posts: 138
Thanks: 156
Thanked 38 Times in 29 Posts
lolaya is on a distinguished road
O.o
Reply With Quote
  #6  
Old 07-10-2016, 02:27
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,749
Thanks: 2,170
Thanked 11,206 Times in 2,307 Posts
Razor12911 is on a distinguished road
Quote:
Originally Posted by JRD! View Post
Not a thank you in 48 h, if it do not agree, it must be said, if it is just the size and not free space, I don't know, but I know not against, it's that this is the last time that I help...
Haha, same thing I'm dealing with, you sometimes wonder if the thanks button is hidden from other users, at least to show appreciation.
I was approached by this guys who asked this question because he failed to solve a simple code, the code was pretty simple so after telling him what to do, he sent an attachment and asked for help with the code, I ignored it, he then sent PM, on the case, same day, I then had to leave my assignment and help him, helped him, he then asks another question, no thanks received in the process.

http://fileforums.com/showthread.php?t=98306
http://fileforums.com/showthread.php?t=98345 , this question is ignored on purpose.

Just do this, they ignore thanks button, ignore question.

Last edited by Razor12911; 07-10-2016 at 02:53. Reason: Fixing my garbage English.
Reply With Quote
The Following 3 Users Say Thank You to Razor12911 For This Useful Post:
JRD! (07-10-2016), mausschieber (07-10-2016), RamiroCruzo (07-10-2016)
  #7  
Old 09-10-2016, 10:50
52098994 52098994 is offline
Registered User
 
Join Date: Oct 2016
Location: china
Posts: 10
Thanks: 4
Thanked 0 Times in 0 Posts
52098994 is on a distinguished road
Smile

Quote:
Originally Posted by JRD! View Post
Not a thank you in 48 h, if it do not agree, it must be said, if it is just the size and not free space, I don't know, but I know not against, it's that this is the last time that I help...
be a long time See your reply,I am very sorry
my English is poor.

Automatic installation path to the Maximum free space drive
Check all Maximum free space drive (except Flash-USB, CD Drive,USB disk....only checks for hard disk)
IF
C free space:50G
D free space:100G
E free space:200G
F free space:180G
Default installation path to E drive(Maximum free space drive)

think you

Last edited by 52098994; 09-10-2016 at 11:06.
Reply With Quote
  #8  
Old 09-10-2016, 11:07
52098994 52098994 is offline
Registered User
 
Join Date: Oct 2016
Location: china
Posts: 10
Thanks: 4
Thanked 0 Times in 0 Posts
52098994 is on a distinguished road
Quote:
Originally Posted by Razor12911 View Post
be a long time See your reply,I am very sorry
my English is poor.

Is to ask questions in this post?
Reply With Quote
  #9  
Old 09-10-2016, 16:55
JRD!'s Avatar
JRD! JRD! is offline
Registered User
 
Join Date: Sep 2015
Location: Matrix
Posts: 274
Thanks: 225
Thanked 600 Times in 168 Posts
JRD! is on a distinguished road
Certainly the improved:
Code:
#ifdef UNICODE
  #define AW "W"
#else
  #define AW "A"
#endif

type
  TDiskInfo = record
    DriveRoot: string;
    FreeSpace: cardinal;
    TotalSpace: cardinal;
  end;

  TDiskInfos = array of TDiskInfo;

function GetDriveType(lpRootPathName: string): UINT;
  external 'GetDriveType{#AW}@kernel32.dll stdcall';
function GetLogicalDriveStrings(nBufferLength: DWORD; lpBuffer: string): DWORD;
  external 'GetLogicalDriveStrings{#AW}@kernel32.dll stdcall';

Function GetMaxFreeSpace(Value: String): String;
var
  S: String;
  I, J: Integer;
  DiskInfos: TDiskInfos;
begin
  I := 0; J:=0;
  if GetLogicalDriveStrings(0, #0) > 0 then
  begin
    SetLength(S, GetLogicalDriveStrings(0, #0));
    if GetLogicalDriveStrings(Length(S), S) > 0 then
    begin
      S := TrimRight(S) + #0;
      while Pos(#0, S) > 0 do
      begin
        if (GetDriveType(Copy(S, 1, Pos(#0, S) - 1)) = 3) then
        begin
          Inc(I);
          SetLength(DiskInfos, I);
          DiskInfos[I-1].DriveRoot:=Copy(S, 1, Pos(#0, S) - 1);
          GetSpaceOnDisk(DiskInfos[I-1].DriveRoot, True, DiskInfos[I-1].FreeSpace, DiskInfos[I-1].TotalSpace);
        end;
        Delete(S, 1, Pos(#0, S));
      end;
      for I := 0 to Length(DiskInfos) -1 do
      begin
        if I = 0 then
        J := DiskInfos[i].FreeSpace else
        begin
          if J > DiskInfos[i].FreeSpace then J := J else
          begin
            J := DiskInfos[i].FreeSpace;
            Result:=DiskInfos[i].DriveRoot;
          end;
        end;
      end;
    end;
  end;
end;
Attached Files
File Type: 7z GetMaxFreeSpace.7z (931 Bytes, 22 views)
__________________
Practice makes perfect.

Last edited by JRD!; 09-10-2016 at 16:57.
Reply With Quote
The Following 5 Users Say Thank You to JRD! For This Useful Post:
52098994 (09-10-2016), 78372 (02-07-2017), Chayan Manna (30-06-2017), pakrat2k2 (09-10-2016), SAM2712 (10-10-2016)
  #10  
Old 10-10-2016, 05:53
52098994 52098994 is offline
Registered User
 
Join Date: Oct 2016
Location: china
Posts: 10
Thanks: 4
Thanked 0 Times in 0 Posts
52098994 is on a distinguished road
Quote:
Originally Posted by JRD! View Post
Certainly the improved:
Code:
#ifdef UNICODE
  #define AW "W"
#else
  #define AW "A"
#endif

type
  TDiskInfo = record
    DriveRoot: string;
    FreeSpace: cardinal;
    TotalSpace: cardinal;
  end;

  TDiskInfos = array of TDiskInfo;

function GetDriveType(lpRootPathName: string): UINT;
  external 'GetDriveType{#AW}@kernel32.dll stdcall';
function GetLogicalDriveStrings(nBufferLength: DWORD; lpBuffer: string): DWORD;
  external 'GetLogicalDriveStrings{#AW}@kernel32.dll stdcall';

Function GetMaxFreeSpace(Value: String): String;
var
  S: String;
  I, J: Integer;
  DiskInfos: TDiskInfos;
begin
  I := 0; J:=0;
  if GetLogicalDriveStrings(0, #0) > 0 then
  begin
    SetLength(S, GetLogicalDriveStrings(0, #0));
    if GetLogicalDriveStrings(Length(S), S) > 0 then
    begin
      S := TrimRight(S) + #0;
      while Pos(#0, S) > 0 do
      begin
        if (GetDriveType(Copy(S, 1, Pos(#0, S) - 1)) = 3) then
        begin
          Inc(I);
          SetLength(DiskInfos, I);
          DiskInfos[I-1].DriveRoot:=Copy(S, 1, Pos(#0, S) - 1);
          GetSpaceOnDisk(DiskInfos[I-1].DriveRoot, True, DiskInfos[I-1].FreeSpace, DiskInfos[I-1].TotalSpace);
        end;
        Delete(S, 1, Pos(#0, S));
      end;
      for I := 0 to Length(DiskInfos) -1 do
      begin
        if I = 0 then
        J := DiskInfos[i].FreeSpace else
        begin
          if J > DiskInfos[i].FreeSpace then J := J else
          begin
            J := DiskInfos[i].FreeSpace;
            Result:=DiskInfos[i].DriveRoot;
          end;
        end;
      end;
    end;
  end;
end;
Perfect!!! Thank you
Reply With Quote
  #11  
Old 13-10-2016, 12:55
52098994 52098994 is offline
Registered User
 
Join Date: Oct 2016
Location: china
Posts: 10
Thanks: 4
Thanked 0 Times in 0 Posts
52098994 is on a distinguished road
Quote:
Originally Posted by JRD! View Post
Certainly the improved:
Code:
#ifdef UNICODE
  #define AW "W"
#else
  #define AW "A"
#endif

type
  TDiskInfo = record
    DriveRoot: string;
    FreeSpace: cardinal;
    TotalSpace: cardinal;
  end;

  TDiskInfos = array of TDiskInfo;

function GetDriveType(lpRootPathName: string): UINT;
  external 'GetDriveType{#AW}@kernel32.dll stdcall';
function GetLogicalDriveStrings(nBufferLength: DWORD; lpBuffer: string): DWORD;
  external 'GetLogicalDriveStrings{#AW}@kernel32.dll stdcall';

Function GetMaxFreeSpace(Value: String): String;
var
  S: String;
  I, J: Integer;
  DiskInfos: TDiskInfos;
begin
  I := 0; J:=0;
  if GetLogicalDriveStrings(0, #0) > 0 then
  begin
    SetLength(S, GetLogicalDriveStrings(0, #0));
    if GetLogicalDriveStrings(Length(S), S) > 0 then
    begin
      S := TrimRight(S) + #0;
      while Pos(#0, S) > 0 do
      begin
        if (GetDriveType(Copy(S, 1, Pos(#0, S) - 1)) = 3) then
        begin
          Inc(I);
          SetLength(DiskInfos, I);
          DiskInfos[I-1].DriveRoot:=Copy(S, 1, Pos(#0, S) - 1);
          GetSpaceOnDisk(DiskInfos[I-1].DriveRoot, True, DiskInfos[I-1].FreeSpace, DiskInfos[I-1].TotalSpace);
        end;
        Delete(S, 1, Pos(#0, S));
      end;
      for I := 0 to Length(DiskInfos) -1 do
      begin
        if I = 0 then
        J := DiskInfos[i].FreeSpace else
        begin
          if J > DiskInfos[i].FreeSpace then J := J else
          begin
            J := DiskInfos[i].FreeSpace;
            Result:=DiskInfos[i].DriveRoot;
          end;
        end;
      end;
    end;
  end;
end;





What is this error?
why?
Reply With Quote
  #12  
Old 29-06-2017, 12:44
JRD!'s Avatar
JRD! JRD! is offline
Registered User
 
Join Date: Sep 2015
Location: Matrix
Posts: 274
Thanks: 225
Thanked 600 Times in 168 Posts
JRD! is on a distinguished road
Code:
#ifdef UNICODE
  #define AW "W"
#else
  #define AW "A"
#endif

function GetDriveType(lpRootPathName: string): UINT;
  external 'GetDriveType{#AW}@kernel32.dll stdcall';

function GetMaxFreeSpaceDrive: String;
var
  i: Integer;
  sDriveRoot: string;
  iLastMax, iNewMax, iTotal: Cardinal;
begin
  iLastMax:=0;
  for i := 1 to 26 do
  begin
    sDriveRoot := Chr(i+64)+':';
    if GetDriveType(sDriveRoot) = 3 then
    begin
      GetSpaceOnDisk(sDriveRoot, True, iNewMax, iTotal);
      if iLastMax < iNewMax then
      begin
        iLastMax := iNewMax;
        Result:=sDriveRoot;
      end;
    end;
  end;
end;
__________________
Practice makes perfect.
Reply With Quote
The Following 3 Users Say Thank You to JRD! For This Useful Post:
Chayan Manna (03-07-2017), Razor12911 (30-06-2017), Simorq (04-07-2017)
  #13  
Old 03-07-2017, 19:56
Chayan Manna's Avatar
Chayan Manna Chayan Manna is offline
Registered User
 
Join Date: Jun 2016
Location: India
Posts: 82
Thanks: 89
Thanked 114 Times in 37 Posts
Chayan Manna is on a distinguished road
Quote:
Originally Posted by JRD! View Post
Code:
#ifdef UNICODE
  #define AW "W"
#else
  #define AW "A"
#endif

function GetDriveType(lpRootPathName: string): UINT;
  external 'GetDriveType{#AW}@kernel32.dll stdcall';

function GetMaxFreeSpaceDrive: String;
var
  i: Integer;
  sDriveRoot: string;
  iLastMax, iNewMax, iTotal: Cardinal;
begin
  iLastMax:=0;
  for i := 1 to 26 do
  begin
    sDriveRoot := Chr(i+64)+':';
    if GetDriveType(sDriveRoot) = 3 then
    begin
      GetSpaceOnDisk(sDriveRoot, True, iNewMax, iTotal);
      if iLastMax < iNewMax then
      begin
        iLastMax := iNewMax;
        Result:=sDriveRoot;
      end;
    end;
  end;
end;
Perfect code !!!!!
Thanks !!!!!
Please can you add a function
That's here:
If the max drive is c then the path will be C:/Programfiles/{#Appname}
Otherwise it will be something else like E:/{#Appname}
Thanks
Reply With Quote
  #14  
Old 04-07-2017, 10:59
JRD!'s Avatar
JRD! JRD! is offline
Registered User
 
Join Date: Sep 2015
Location: Matrix
Posts: 274
Thanks: 225
Thanked 600 Times in 168 Posts
JRD! is on a distinguished road
Simply call the function with your constant at the end:

GetMaxFreeSpaceDrive + '\' + ExpandConstant('{#Appname}');
__________________
Practice makes perfect.
Reply With Quote
The Following User Says Thank You to JRD! For This Useful Post:
Chayan Manna (04-07-2017)
  #15  
Old 04-07-2017, 12:07
Chayan Manna's Avatar
Chayan Manna Chayan Manna is offline
Registered User
 
Join Date: Jun 2016
Location: India
Posts: 82
Thanks: 89
Thanked 114 Times in 37 Posts
Chayan Manna is on a distinguished road
Quote:
Originally Posted by JRD! View Post
Simply call the function with your constant at the end:

GetMaxFreeSpaceDrive + '\' + ExpandConstant('{#Appname}');
Please give an Example.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Doom 3 (KillaWare version) DVD impossible to update and/or install Resurrection of Ev zlxvw PC Games 2 18-04-2005 09:56
DSM3 Install Questions deerayrose PS2 Games 5 11-04-2004 19:52
Alternative points for Origa chip install. Civic2000 PS2 Games 4 12-01-2002 01:19
Pool of Radiance Install Directory Problem.. HELP!! EEpyon2k PC Games 1 20-12-2001 10:00
Diablo II (backup) install problems... Maketty PC Games 2 03-08-2001 15:22



All times are GMT -7. The time now is 01:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com