hallo zusammen
habe ein kleines program unter c++ (borland) geschrieben was auch soweit lauffähig ist.
unter dos läuf es bereits einwandfrei. ich möchte es jedoch unter ntfs-dos lauffähig bekommen ohne das nt4 gestartet wird.
der quellcode sieht derzeit so aus:
//---------------------------------------------------------------------------
#include <registry.hpp>
#include <iostream.h>
#include <fstream.h>
//---------------------------------------------------------------------------
int main()
{
system("ntfsdos.exe");
char SetPcName[16];
AnsiString GetPcName;
cout << "Bitte neuen PcNnamen eingeben: ";
cin >> SetPcName;
TRegistry &read = *new TRegistry();
read.RootKey=(HKEY_LOCAL_MACHINE);
bool Bx = read.OpenKey("SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ComputerName",false);
if (Bx) {
GetPcName=read.ReadString("ComputerName");
fstream datei;
datei.open("go.bat",ios_base::out);
datei << "sidchngr 0\\winnt /r /cr=" << GetPcName.c_str() << ", " << SetPcName << " /b /o=" << SetPcName;
datei.close();
read.CloseKey();
}
delete &read;
system("go.bat");
return 0;
}
//---------------------------------------------------------------------------
wenn ich den quelcode in eine ne *.c einfüge und ausführen lasse hat er jedes mal probleme mit dem 'fstream' . hat einer von euch einen tip wie ich das ganze unter ntfs-dos zum laufen bekommen kann?
ich danke euch schonmal im vorraus
cosmo