I built a software for socket servers, which worked perfectly on my pc (windows 10), yesterday I put it on a vps (windows server 2012 & windows server 2008R2) test on both, and had the same problem:
I put the system on local disk C:\MainServer\, the program should automatically run a socket tcp server in the folder: C:\MainServer \MyServer\
To run this server in the "C:\MainServer\MyServer\" folder, I used the following command:
Code: Select all
RunProgram(GetCurrentDirectory()+"MyServer\server.exe", "", GetCurrentDirectory()+"MyServer\)
Code: Select all
SetCurrentDirectory (GetCurrentDirectory () + "MyServer\")
RunProgram(GetCurrentDirectory()+"MyServer\server.exe", "", GetCurrentDirectory()+"MyServer\)
Delay (10); if I remove the delay, "server.exe" still can not read the local settings (ServerConfig.ini)
SetCurrentDirectory ("C:\MainServer\")
#Sorry by my bad english :c