Veröffentlicht 18. Dezember 200321 j Moin! Hat jemand schon einmal mit der Funktion SetEnvVariable gearbeitet? Ich schreibe zwar in Delphi, aber der Aufruf ist in Delphi nicht vernünftig eingebunden. Ich habe den Befehl im Windows-SDK gefunden, aber weiß nicht, in welcher DLL er steckt. Im MSDN habe ich auch keine vernünftigen Inofs gefunden. Wer also näheres über den Befehl weiß, schnell Posten. P.S.: Ich meine NICHT "SetEnvironmentVariable" aus Kernel32.dll, sondern echt SetEnvVariable!
18. Dezember 200321 j Original geschrieben von Pointerman Ich habe den Befehl im Windows-SDK gefundenIch nicht. Bist du dir ganz sicher, dass es den gibt? Kannst du ein paar Textstellen aus der SDK-Dokumentation zitieren? Dann könnte ich effektiver suchen. Nachtrag: This is a function from the setup SDK intended for DOS-based installation programs. YOu cannot use it from a Windows program Quelle: google groups link
18. Dezember 200321 j Autor Hier hab ich mal kopiert, was ich im SDK gefunden habe: BOOL SetEnvVariable(LPSTR szName, LPSTR szValue, CMO cmo); SetEnvVariable sets the specified environment variable to a certain value. The environment variable can also be elongated by specifying the command option flag fAppend or fPrepend. Under Windows NT, the environment variables affected are the ones specified in the registry. Under Windows 95, autoexec.bat is modified to set the values. Arguments szName Specifies the name of the environment variable. szValue Specifies the new value that you want to associate with the environment variable. cmo Specifies the command option flag. You can use fOverwrite, fAppend, or fPrepend. Return Value If the function succeeds, it returns fTrue. If the function fails, it returns fFalse. See Also RemoveEnvVariable
18. Dezember 200321 j Autor Jetzt ja! Mhhh, ist eine Antwort, nur leider keine die ich hören wollte. Warum kann nicht einfach mal etwas ganz einfach funktionieren? Danke trotzdem!
Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.