contactskn 2 Report post Posted December 22, 2009 Dear friends I have made a software and installed on many computers in different localities and now this software is being developed in VB.net. Actually this software runs only if a specified file is being saved to a specified folder. For example abc.txt, and this file is not given with the installer of the software. Now my problem is I want to copy this file to my wwwroot directory of my website where the index.html file resides, and like to place a button on a page which when clicked will start copying this specified file to the clients computer in for example c:\abc\ but here the concept should be that at the client side the user should not know where actually the file is being copied. Please help me friends with proper code.? Share this post Link to post Share on other sites
Quatrux 4 Report post Posted December 22, 2009 I don't really understand what you're trying to do, but if it's done with PHP and you want to do that, check this function: http://de2.php.net/readfilewith it you can read a file from a location you know and output that file to a user by showing your location from a php file, for example index.php?file=myfile and this is going to be the path of that file..I used to use readfile for dynamic images, also used to use it for showing ordinary images, but later thought that just linking to an image is better. Share this post Link to post Share on other sites
rvalkass 5 Report post Posted December 22, 2009 the concept should be that at the client side the user should not know where actually the file is being copied. Please help me friends with proper code.?Thankfully, that's not possible. Most users will either set a default download location for all files, or will choose where to save each file they download individually. If website owners could choose where to save files then you are opening a whole world of issues. You've got two choices: either let people download the file and provide them with instructions on where to put it, or write an application that will download the file and move it to the right location (although that may be stopped by antivirus software on Windows PCs). Share this post Link to post Share on other sites
BCD 1 Report post Posted December 22, 2009 The file can be included along with the installer. When the client installs it, let the text file be copied to the specific location. Isn't that possible with the installer? Or are there any other issues? Share this post Link to post Share on other sites
k_nitin_r 8 Report post Posted December 22, 2009 Hi! @contactskn I am guessing that you want to display news or do something similar with your software. You ought to take a look at RSS.NET, Atom.NET, or Wizz RSS News Reader - you might be able to reuse some of their source code, but you ought to look up the terms of the GNU GPL open source license (or whichever license applies to the source code that you intend to use within your own software). If you want the installer to download a file, you might be able to code the functionality you need into the installer. However, if you want to do this within a web browser, you would need to have a signed Java applet or an ActiveX control that can make the request to the server to download the file. This may not necessarily work on all systems due to security policies that are in place. When deploying software within an office network, you might have a Microsoft Windows 2000/2003/2008 domain that you can deploy software with by setting a group policy. I believe your installer would have to be a .MSI file for this to work; Microsoft also provides a tool to generate a .MSI file for you if all you have is the .EXE installer. @Quatrux The standard fopen() function also works on URLs, but I guess you are addressing the server-side of the problem with the readfile() function. @rvalkass Having the user place the downloaded file in a particular directory raises the question of whether the user actually has the technical knowledge to do follow the provided instructions. This is generally assumed by some software vendors who email a license file to buyers and require the user to place the license file in a particular directory. Other firms, such as Microsoft, simply require the entry of a product key and an activation key. Or better yet, using the software-as-a-service principle. the software can run entirely on a web server with the user accessing it via a web browser, such as Microsoft Internet Explorer, Mozilla Firefox, or Google Chrome (Remotely related comment: Check out Google's video of people answering the relatively simple question, "What is a browser" :-P). @BCD A simple solution for a simple problem - distribute the file with the installer instead of placing it on a server for the user to download. I believe the Keep-It-Simple-And-Sweet principle is the best way to develop software. If a web browser started up with an array of a few dozen buttons, it may not have had the success that it sees today. Share this post Link to post Share on other sites
contactskn 2 Report post Posted December 24, 2009 The file can be included along with the installer. When the client installs it, let the text file be copied to the specific location. Isn't that possible with the installer? Or are there any other issues?Dear friend including the file in the installer is very easily possible but the problem is that the installer can be copied by others and the developer can not get any thing for the extra copies being made and used, I am talking about the piracy concept. But I don't want the facility been included in the installer. Rather than I would like to copy this key file online when ever the user gets online or so. Share this post Link to post Share on other sites
BCD 1 Report post Posted December 24, 2009 Oh, so you are creating licensing feature for your software? As you didn't mentioned that in the first thread, I thought the file you are talking is something which helps the application, not license thing.Is the license file common? I mean, is it different for different users based on their usernames or whatever unique info you can get from user? Actually this software runs only if a specified file is being saved to a specified folder.May be you can allow the users to download wherever they want. Add a dialog box in your application where the user can select the downloaded file. Your application can then move the file to appropriate place. I am just telling he idea, don't know if its possible.Another idea for licensing would be to create a unique key based on the user's windows login name. Give them this key through email when they register, of course asking for their windows username before that. If you like this idea, you can PM me, I will get you in touch with the person who has already done and implemented that in their software. But, you may need to pay him, if you want this thing done. If thats not the idea, then well may be you can try googling or may be other members might help. Share this post Link to post Share on other sites