Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

Reply
 
Thread Tools Display Modes
  #11  
Old 08-18-2010, 10:02 AM
Shaun Hand Shaun Hand is offline
Junior Member
 
Join Date: Aug 2010
Posts: 24
Default Solved!

I actually decided to go that route yesterday, and have added the required parts to create the folders where I want them.
Using a much shorter version though.

function GetSpecialFolderPath(folder : integer) : string;
const
SHGFP_TYPE_CURRENT = 0;
var
path: array [0..MAX_PATH] of char;
begin
if SUCCEEDED(SHGetFolderPath(0,folder,0,SHGFP_TYPE_CU RRENT,@path[0])) then
Result := path
else
Result := '';
end;

The ini file is written in the user's/appdata/folder . Also read next time the app is used.

var
path: string;
begin
path:=GetSpecialFolderPath($001a)+'\UTCT\';
if NOT DirectoryExists(path) then
ForceDirectories(path);
ini := TIniFile.Create(GetSpecialFolderPath($001a)+'\UTCT \Filename.ini');

The installer is now only creating a folder in Program Files, and placing the app in that folder, also creating a shortcut in the startup folder.

Busy trying to get a database funtion into my app. The database is an Excel file with all the data.

It's very confusing getting the implimentation to work.

Thanks for all the help. Solved, I Think, unless in W7/Vista it doesn't allow me to install the app.
Reply With Quote
Reply

Thread Tools
Display Modes

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


All times are GMT. The time now is 07:06 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.