I have a kiosk computer that runs IE 9.0 "http://localhost" to display content on the D:\ drive.
I want to be able to write a program that when a USB flash drive is inserted, it will copy the files from the flash drive and then reload the localhost page. The computer runs XAMPP (Apache and PHP). How can I accomplish this?
I was thinking of using Windows Task Scheduler and run it every 5 minutes, but sometimes it can take longer than 5 minutes to copy files. And if I set it to 15min to be safe, then the person updating the kiosk has to wait approx 15 minutes for the task to run again, plus the time to copy.
Any help, ideas, or direction on how to proceed would be GREAT!
Could you write a Windows service that periodically (once every 10-20 seconds?) checks for files on the drive letter that the thumb drive uses? If files are found, copy them to the proper locations.
Does the computer have internet access? Normally these things would just be pushed out to the computer remotely.
Related
After thinking about this for 2 weeks, I have to ask this question.
I've created a NW.js app that works smoothly and nice on 7 different laptops and PCs. The app shows html videos and contains a bunch of javascripts, I've got deloped since 2 years. Alls this works fine on every laptop/PC.
Here comes the problem:
On one laptop the app works, too, but the app isn't able neither to show HTML frame contents nor to execute js scripts from a specific web domain. This only occurs with a specific domain (that I'm the owner of).
The strange thing is, that this happens only on one laptop.
The laptop uses the same internet connection as some other devices. I reinstalled the app, deleted all subfolders from the app folder, but the error is back. In the frame I see the silly message, that the website is down or moved.
You likely have a system-wide proxy configured or possibly some AV software installed on that laptop is blocking that site. Attempt to access the same URL through another browser (Chrome, Edge, Firefox, etc.) to confirm.
Could be related to your hosts file.
C:\Windows\System32\drivers\etc\hosts
That is a plain text file without an extension. You can put URL's or IP addresses in it and it will block any access to them globally on the computer.
Though Sysrage is probably right, it's more likely that you just have some AV/firewall/security software blocking stuff it shouldn't (happens all the time, they can be "over protective" sometimes)
If it is something related to your NW.js install, and it isn't happening on other machines (so you know your app code is correct), then you could try deleting the app data folder for you app. To find it's location on the computer run console.log(nw.App.dataPath). It should be something like:
C:\Users\YOUR USER NAME\AppData\Local\YOUR APP NAME
You can just delete the whole folder (make sure your app isn't running first). Then the next time you open your app it will recreate that folder (it's a chromium thing). Things like saved passwords or dev tool customization or spellcheck dictionary modifications are stored in there. So maybe there's just something funky that needs cleared out.
I would like to find a way to have a Windows computer share a virtual PDF printer with other local computers (that first part is easy!). However, I would like the PDF to be saved on the print server and not on the computer from which the print out is initiated. Any idea how to do that?
This is going to depend on your skill at resolving other driver problems.
I was able after several false starts to get a 32bit Win 7 peer user (admin) to print on My Win 10 restricted user Virtual printer. But the output result is not great so would need to dig deeper, than I need, just to find out why.
I used a GhostScript Virtual Printer since It allows remote users on network to download its drivers for ARM x64 and x32
It is hosted on a 64bit Win 10 restricted account so I had to jump through hoops to get it seen and accessible on the network, and then had to dig into it share settings to see 32bit/Arm clients need an extra check box on.
It took some challenges to get the 32bit client to see printer was available but it ran from there with the above test page output in the 64bit printme folder, Whilst monitoring that file visually real-time a print from the client was transmitted and instantly appeared on the host screen without noticeable corruption unlike the test print!!.
So an issue you could have is how to stop clients from overwriting the file whilst they are post processed (renamed like in a port redirection monitor) since my GS virtual printer uses a single named NoPromptPort.pdf
Your question should in effect be answered, However My Question is why go this route? It would be so much simpler efficient and reliable for each client to MSPrint to NoPromptPort.PDF then simply copy their renamed.PDF to a server folder.
Is there any way to make a file automatically run when USB or hard drive is plugged to a computer?
I have tried with the autorun.inf file, but the function has been removed in win 7 and 8.
Microsoft has disabled this feature by default on 'non-optical drives' from Windows 7 and onward in order to reduce chances of malware being run. This was replaced with the 'AutoPlay' prompt, which asks the user what they would like to do before executing any applications.
A common malware attack against businesses is to leave a USB drive where an unsuspecting employee will find it. Usually curiosity gets the better of the employee and they insert the newly-found USB drive into their company computer to "see whats on it". If the computer allows any program to run when the drive is mounted (as autorun.inf used to allow) then a virus can execute immediately without any further user input.
Here's some more in-depth reading on the subject - http://blogs.technet.com/b/srd/archive/2009/04/28/autorun-changes-in-windows-7.aspx
I am currently capturing images when a GPIO pin is triggered and saving them to the raspberry pi itself. I want to be able to send those files to a computer on the same network automatically without having to ssh in using PUTTY, Filezilla, etc...
Any suggestions on how to do this?
take a look at cron.
man cron
Put an access to where you want your files on your computer, and create a script that checks if there's a new video every X minutes/hours and copies it if that's the case. Launch the script with cron every X minutes/hours.
Okay so I want to make an application that launches other applications. However, the goal here is to make the app "portable" in that I can go from one windows desktop to another while using the same application from a usb drive. So here is a different rundown of what I mean:
I have aplication X. I use it on machine 1 and I want to use it on machine 2. However, machine 2 is my buddy's and he does not want me installing things on it. So, I take all the files that the installer made on my system, and put them into folders. App X put files in the windows folder that it expects when it is launched. If I merely run the the app and it looks in the windows dir it will not find the files. I do not have/want the ability to put files in the windows dir. I want to tell the app to look in folder a for files in folder b instead of where it would normally look. I could then use this program on any machine without having to modify the machine in any way.
Is this doable? If so what is it called so I can look it up?
EDIT: the win dir was an example. I would like the app to be self contained in a folder on the thumb drive. I want to redirect the where the app looks for files to a folder I specify.
This can be done, but how easily depends entirely on the program that you are launching.
The sorts of things that applications will do are:
Just run happily being executed anywhere (no dependencies). These are very easy!
Require some environment variables to be set up. This is easy to do - you can launch a new process with a modified environment if you wish.
Read files from disk. Usually when loading things like .dlls, applications will search on the PATH for the dlls, so they can be copied into the application folder (next to the .exe) and it will run happily on any system. However, in some cases applications will use fixed (or at least, less flexible) paths so that they will be harder to launch successfully.
Read registry settings. This is trickier. You need to know what state is required by the application, have your launcher record the old registry state, change it and run the application, then wait for application exit to restore the original state. This has to be bullet-proof to avoid corruption of the user's registry.
Ultimately you'll need to investigate, for each app you want to launch, just what it needs to run.
If the apps are commercial, then be careful that you are not breaking any licensing (EULA) terms by running them in this way.
Another alternative would be to set up a virtual PC image and simply execute that on the host PC so there is no need to worry about any special cases for each application. Depending on the VPC software you have available you may need to install software on the host PC to allow a virtual PC session to be run though, which may defeat the purpose/intent.
I think the system you describe is U3 (more info at http://en.wikipedia.org/wiki/U3). It requires the application to follow the U3 protocol, but if the application does, then it can be run off of a U3 flash drive without any install or admin permissions required on the host machine.
It's a proprietary technology, and supported by only a few vendors that I've seen.
If you really want portability and power, consider VMWare Player, and carry and entire machine, customized to your needs, on the flash drive. Of course, your friend would probably have to allow you to install VMWare Player.