Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Sebastian einen RRRRRIIIIIEEEEEEEEEESSSENN Dank an dich. :thumb:
Mir ist wichtig, dass das Programm auch ohne Adminrechte läuft, alles andere ist nicht so wichtig für einen Hobby-Programmierer.
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Und was bring mir das? :gruebel: ich werde doch testen, ob das läuft oder nicht.
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Wow.... werd jetzt einbauen. :thumb:
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Ok es klappt jetzt alles :thumb:
Und wird das auch unter Vista gehen, was meinst du?
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Doch die config.ini hat er gefungen :thumb: Aber wieso finden die Suche sie nicht?
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Also so?
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
var ini: TIniFile;
dir: String;
begin
if GetUserdataPath(dir) then
begin
Ini := TIniFile.Create(dir + 'config.ini');
try
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Etwa so:
var dir String;
Ini := TIniFile.Create(ExtractFilePath(GetUserdataPath(dir)) + 'Ininame.ini');
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Und wie kann ich das Speicher in die .ini umgehen falls User keine Rechte zum speichern hat? Werde dann auf das Speichern verzichten, Hauptsache man kann das Programm schließen.
Geht das so ähnlich wie folg:
Speichern
if ok then
begin
Gespeichert
Programm schließen
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Etwa so? :gruebel:
function GetSpecialFolder(Folder: Integer): String;
begin
SetLength(Result,MAX_PATH);
If SHGetSpecialFolderPath(0, PChar(Result), Folder, false)
then SetLength(Result,StrLen(PChar(Result)))
else Result:='';
end;
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Also ich hab das bei mir wie folgt:
procedure TForm1.FormShow(Sender: TObject);
var ini :TIniFile;
begin
Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'config.ini');
try
ComboBox1.ItemIndex := Ini.ReadInteger('Default', 'Channel', 0);
TrackBar1.Position := Ini.ReadInteger('Default', 'Volume', 10);
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Post #3 bleibt dann die einzige Lösung? :gruebel:
Ich komme mit dieser aber nicht klar, gibt's vllt andere Lösungen?
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Wieso nicht? :gruebel: Hab sowas schon mal gesehen. Also alles ok, denk nicht so kompliziert. Sag mir lieber wie der Code im Inno dafür lautet?
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Ich kann doch einfach das Programm für alle Benutzer installieren, ist doch viel leichter und man brauch das Programm nicht umschreiben?
Aber wie mache ich das im Inno Setup Compiler, kann mir jemand sagen?
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Das liegt in C:\Programme
Und wie packe ich das ins User-Verzeichnis? :gruebel:
Forum: Sonstige Fragen zu Delphi
Delphi
by AlexII,
26. Mär 2009
Kann ich irgendwie das Speichern der Einstellungen in eine .ini irgendwie umgehen bzw. gar nicht speichern wenn der User keine Adminrechte besitzt? Weil sonst die fehlermeldung kommt, dass man in die .ini nicht speicher kann und das Programm lässt sich nicht schließen.
Danke!