Kevin
Kevin

Reputation: 2730

how to execute a batch file from a website

I know this sounds fishy, but I'm trying to run a batch file from a website. Our users are seniors that wouldn't know how to do anything with a computer. Our software is a replacement for the windows shell. When the computer starts, it automatically starts our software and nothing else. Our users never see windows, only our application. It is written in C# and after presenting a login screen shows the user a full-screen web application.

We have a system where we update our application via a batch file it downloads by itself. However, the dialog window asking the user for an update is broken (minimized, so the user doesn't see it). Now our users can't update our application. We fixed this bug in the current version, but users can't get the new version.

Is there any way to run a batch file from a website? The batch file is already downloaded by our application, it just needs to run. It is located in c:/users/the_user/appdata/roaming/. If anyone has any idea how we could run the batch file remotely, that would be awesome.

I know it would be a huge security risk if something like this is possible, please don't point that out to me. It is also not their computer that runs the software, but one we provide for the purpose of the application. If a user does not want to use the app anymore, we take the computer back as well. There can not be any personal data saved on it, because there is simply no way for the user to get it on there.

Our update process goes like this: the C# app downloads a zip from our web-server if there is a new version -> the app asks the user if he/she wants to install that update -> if the user presses yes, the c# app closes and runs the batch file that copies the contents from the zip to the folder where our c# app resides -> at the end of the batch file is a system restart command, after restarting the tablet our app starts up and the user can continue using it.

Upvotes: 3

Views: 5760

Answers (1)

foxidrive
foxidrive

Reputation: 41224

No, it can't launch a batch file from a website.

A browser will just save it to the local drive or open it in the web page.

Upvotes: 2

Related Questions