spawN-eD 0 Report post Posted May 6, 2011 hi all Xisto users , admins , mods i didn know where to write this but i will try here ;)so story is simple i got made .bat file who receive OS version , computer name and ipconfig and its saving to %computername%.txt now i have a question and thats sounds like this:After .bat file start it will do the job but not save to .txt but send info to php or mysql to other pc or server where is that mysql database is that posible? and how? explane me or show some simple :lol:sory my bad english Share this post Link to post Share on other sites
yordan 10 Report post Posted May 6, 2011 Is it really necessary to use a .bat file?More precisely, isn't this a homework you have to do at school?Isn't it simpler to let the php program do the job and insert the result inside the database? hi all Xisto users , admins , modsi didn know where to write this but i will try hereThis topic is not a tutorial. So, you are right, you should not have posted it in the tutorial section. Share this post Link to post Share on other sites
spawN-eD 0 Report post Posted May 9, 2011 forgive me about it :/ but i need help about this topic Share this post Link to post Share on other sites
manuleka 0 Report post Posted May 9, 2011 i agree with yordan... php mite be the way to go, that is if it's available tho on server.... Share this post Link to post Share on other sites
spawN-eD 0 Report post Posted May 10, 2011 i thinked about it bet how to make this php script ?in .bat file it should looke like thiswget http://forums.xisto.com/no_longer_exists/%something like this i think but now i will need that pc.php script :/sory my bad english Share this post Link to post Share on other sites
yordan 10 Report post Posted May 11, 2011 Sorry, but, this is quite not clear.the wget sentence is easy to put in a .bat file.What we cannot understand is what you want to be done. Why do you need a mysql database?And what is the operation that has to be performed. Do you want to save on your server the contents of the whole PC of each guy accessing your website?Why do you need to store the IP address, password and start a wget remote backup?You know, we cannot fully help you if we do not fully understand what you are wanting to be performed. Share this post Link to post Share on other sites
spawN-eD 0 Report post Posted May 12, 2011 im computer tehnic and we got clients show live in citys who are far away from us and if something happens thos that pc maby we can user vncviewer and that peoples dont know where to see ip and etc ... so we want make programm wich will launch at pc start and send info about this user so that info will save in mysql or etc and displays in some php file Share this post Link to post Share on other sites
spawN-eD 0 Report post Posted May 12, 2011 (edited) sory for double post but i got net lag :/ Edited May 12, 2011 by spawN-eD (see edit history) Share this post Link to post Share on other sites
yordan 10 Report post Posted May 12, 2011 OK, now we see what you want to do, this can be done very easily.You can do this very easily in a bat file.This bat could be something like this, and could be easily sent at the end of system boot. ipconfig >myip.txtscp myip.txt remoteuser@remoteserver:myip.txtecho ip sent to remote serverOf course, you will have to install scp for windows on your customer system (a free version), and setup scp signatures for unattended send, but this is a standard system administration task.RegardsYordan Share this post Link to post Share on other sites
spawN-eD 0 Report post Posted May 12, 2011 (edited) btw i forgot to say that the server on what i want to send info is based on gentoo systemfor a while i got something like this : @echo offecho [*] Collecting Relevant system informationecho Host Name : %computername% > %computername%.txtsysteminfo | find "OS" >> %computername%.txtsysteminfo | find "Domain" >> %computername%.txtipconfig | find "IP" >> %computername%.txtecho. >> %computername%.txt i made it just for tests and maby what info send to my server Edited May 12, 2011 by spawN-eD (see edit history) Share this post Link to post Share on other sites
yordan 10 Report post Posted May 12, 2011 This is perfect, and should work with your gentoo system.Just have a look at the resulting file to check that all your infos are there, manually check the scp syntax in order to validate your hostname and username settings, and then add the scp line inside your script. Share this post Link to post Share on other sites
spawN-eD 0 Report post Posted May 12, 2011 heh tnx but i have wondered about one thing if the pc got password protected and its got sleep maby is some way to get that password at pc start when user write it or maby its saving in some file Share this post Link to post Share on other sites
yordan 10 Report post Posted May 12, 2011 I am not talking about the PC's admin password.I am talking about a password on your gentoo system for the customer filesystem transfer.Let's say I create a user named "spawned" on your gentoo system.Then, the PC makes a scp myfile.txt spawned@yourser:myfile.txtThe only password which has to be sent is the spawned's password on the gentoo system. And this gentoo user spawned is a user which is only allowed to store the text files received from your customer's PC. And of course this text file should have nothing secret, so that if some spy is listening to your customer's phone line he can catch nothing precious. Share this post Link to post Share on other sites
spawN-eD 0 Report post Posted May 12, 2011 i need clients pc pass not my server root password ;D Share this post Link to post Share on other sites
yordan 10 Report post Posted May 12, 2011 You don't need the client PC admin password, you only need his IP.At least you don't need the PC to send his password through the network, you need the customer to tell you his password through a secured way (while having a coffee together for instance), you only need the current IP to be sent at boot time.And on the gentoo system I was not talking about the root password, I was talking about a dedicated user's password, this user owning the transferred files. Such a user cannot touch the system files, he can only touch the transferred files. Share this post Link to post Share on other sites