procedure TMSDE2005Fm.ButtonInstallClick(Sender: TObject);
Var
txt: TextFile;
aFileName, s: String;
begin
aFileName := GetTempDir + '\PROD_Name.bat';
AssignFile(txt, aFileName);
ReWrite(txt);
s := GetSetupString;
WriteLn(txt, s);
CloseFile(txt);
MessageDlg('Setup will now begin for SQL Server 2005 Express.', mtInformation, [mbOk], 0);
ShellExecute(0,'open',PChar(aFileName),nil,nil,SW_SHOW);
ButtonCancel.Caption := '&Finish';
end;
function TMSDE2005Fm.GetSetupString: String;
begin
Result := '"' + Trim(wwDBEditSetup.Text) + '" /qb';
Result := Result + ' ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SQL_SSMSEE';
Result := Result + ' INSTANCENAME=' + Trim(wwDBEditInstanceName.Text);
Result := Result + ' SAVESYSDB=1';
Result := Result + ' SQLBROWSERAUTOSTART=1';
Result := Result + ' SQLAUTOSTART=1';
Result := Result + ' AGTAUTOSTART=1';
Result := Result + ' SECURITYMODE=SQL';
Result := Result + ' SAPWD=' + Trim(wwDBEditPassword.Text);
Result := Result + ' DISABLENETWORKPROTOCOLS=0';
Result := Result + ' ERRORREPORTING=0';
Result := Result + ' SQMREPORTING=0';
Result := Result + ' ADDUSERASADMIN=1';
Result := Result + ' INSTALLSQLDIR="' + Trim(IncludeTrailingPathDelimiter(wwDBEditTargetDir.Text)) + '"';
end;

What language is the code posted above?

As far as conversion, why are you BLINDLY Converting to VB.NET?

@begginnerdev its Delphi

commented: Thanks, friend! +9
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.