Restart the computer from a local web page?

M

Mussemouse

Hi all.
Sorry for asking this but I try to figure out and learn about local
webpages.
What I would like to have is a autorun file that shows a web page as soon as
a USB drive is inserted. That I made using shellexe.exe ( Just to be run on
Windows computers )
No problem with that.
The problem is that when the user clicks on the restart button in the web
page I would like to execute the program shutdown.exe to restart the
computer... But I can't figure out how to make this happen?

Can anyone point me in the correct direction I would appreciate it very
much.

//Micke
 
J

Jonathan N. Little

Mussemouse said:
Hi all.
Sorry for asking this but I try to figure out and learn about local
webpages.
What I would like to have is a autorun file that shows a web page as soon as
a USB drive is inserted. That I made using shellexe.exe ( Just to be run on
Windows computers )
No problem with that.
The problem is that when the user clicks on the restart button in the web
page I would like to execute the program shutdown.exe to restart the
computer... But I can't figure out how to make this happen?

Can anyone point me in the correct direction I would appreciate it very
much.

Wow, you you really want a web page to do that! Not the role of of HTML,
try building a application! If this is a software installer there are
many out there with reboot after install options...Inno Setup (free)
comes to mind.
 
M

Mussemouse

Jonathan said:
Wow, you you really want a web page to do that! Not the role of of HTML,
try building a application! If this is a software installer there are
many out there with reboot after install options...Inno Setup (free)
comes to mind.

Well it works. Kind of. If I place the shutdown.exe in the root of the USB
drive and call it with a simple <A href="shutdown.exe"> Sometext </a> It
only wants to download it. Not execute it.
Is there a simple easy way to get this working? I don't have nay purpose
with it really but I want to know. If I run a java script, ( Some one wrote
it a long time ago ) then I can do this but I can't find this script
anymore. And since all programming I can do is a little assembler and C it
is of no use in this case.
//Micke
 
J

Jonathan N. Little

Mussemouse said:
Well it works. Kind of. If I place the shutdown.exe in the root of the USB
drive and call it with a simple <A href="shutdown.exe"> Sometext </a> It
only wants to download it. Not execute it.

It's called security. It was the major security flaw of IE to allow
executables to run automatically from a webpage link. With my default
browser SeaMonkey I will only have download as an option, as it should be.
Is there a simple easy way to get this working? I don't have nay purpose
with it really but I want to know. If I run a java script, ( Some one wrote
it a long time ago ) then I can do this but I can't find this script
anymore. And since all programming I can do is a little assembler and C it
is of no use in this case.

You need an installer, not a webpage. Did you look up Inno Setup? Has an
IDE to lead you by the nose thorough the process...

http://www.google.com/search?hl=en&q=Inno+Setup&btnG=Google+Search
Inno Setup - Google Search
 
M

Mussemouse

Jonathan said:
You need an installer, not a webpage. Did you look up Inno Setup? Has an
IDE to lead you by the nose thorough the process...

http://www.google.com/search?hl=en&q=Inno+Setup&btnG=Google+Search
Inno Setup - Google Search

To bad that it doesn't do what I want. I don't want to install anything on
the computer. Only restart it.
Should be possible from autorun with 'shellexec shutdown /r'
( Before I found out this /r I was almost crazy I wanted it to be -r but MS
is MS I guess )
But how to get a browser do that?? :D Well I have to keep on finding a
solution for it.

//Micke
 
J

Jonathan N. Little

Mussemouse said:
To bad that it doesn't do what I want. I don't want to install anything on
the computer. Only restart it.

Why? Why would anyone what a webpage to restart their computer? Now with
a software install *for Windows* it is often required...but if you are
not installing anything, then why?
 
M

Mussemouse

Jonathan said:
Why? Why would anyone what a webpage to restart their computer? Now with
a software install *for Windows* it is often required...but if you are
not installing anything, then why?
I don't want a web page to do this. I want a local web page on a USB drive
to do this. Plug in the USB drive, Autorun ( almost at least ) so a web
page shows up. On this web page click on a link that points to a program on
the USB drive to restart the computer.
A very simple task. But as it seems almost impossible.
If I can from a Script eject the CD-Drive, Change the graphics. and so on
why is it so impossible to restart the computer?
I can do it from a remote server/workstation. But not from a local USB
Drive? Why is it so?

I am just curios nothing else. :D No reason to do it only want to do it. If
there has to be a reason for every action we take there wouldn't be much
done!

//Micke
 
J

Jonathan N. Little

Mussemouse said:
I don't want a web page to do this. I want a local web page on a USB drive
to do this. Plug in the USB drive, Autorun ( almost at least ) so a web
page shows up. On this web page click on a link that points to a program on
the USB drive to restart the computer.

Wrong tool. If you want something to restart your computer, create an
application. If you want to display information, structured, formatted
and have ir have the ability to link to other documents then use HTML.
Having HTML do things to your local system is a security risk. Where
have you been with all the press about drive-by installed malware and IE?
A very simple task. But as it seems almost impossible.

For an application, but not for HTML.
If I can from a Script eject the CD-Drive, Change the graphics. and so on
why is it so impossible to restart the computer?

From an HTML document? I don't think so, not without ActiveX + IE and a
parade of warning dialog boxes...
I can do it from a remote server/workstation. But not from a local USB
Drive? Why is it so?

Repeat from above...USB drives are IT security headache as it is!
I am just curios nothing else. :D No reason to do it only want to do it. If
there has to be a reason for every action we take there wouldn't be much
done!

Because if you could do it with an HTML document on a USB drive then it
could also be done from a webpage hosted from ANYWHERE. Having a system
from ANYWHERE make changes to YOUR system without your control is a "bad
thing" in most people's opinion.
 
M

Mussemouse

Jonathan said:
Wrong tool. If you want something to restart your computer, create an
application. If you want to display information, structured, formatted
and have ir have the ability to link to other documents then use HTML.
Having HTML do things to your local system is a security risk. Where
have you been with all the press about drive-by installed malware and IE?

That is the point! No installation. To get people to use the System I have
on the USB drive I need to reboot the computer. Most people are of some
reason so used to that the computer do the work for them that they can't
even read a simple instruction telling them to insert the USB drive and
then reboot the computer!
For an application, but not for HTML.


From an HTML document? I don't think so, not without ActiveX + IE and a
parade of warning dialog boxes...


Repeat from above...USB drives are IT security headache as it is!


Because if you could do it with an HTML document on a USB drive then it
could also be done from a webpage hosted from ANYWHERE. Having a system
from ANYWHERE make changes to YOUR system without your control is a "bad
thing" in most people's opinion.
Naturally it is a bad thing. :)

//Micke
 
J

Jonathan N. Little

Mussemouse said:
That is the point! No installation. To get people to use the System I have
on the USB drive I need to reboot the computer. Most people are of some
reason so used to that the computer do the work for them that they can't
even read a simple instruction telling them to insert the USB drive and
then reboot the computer!

The USB has a bootable OS? That is another issue. Still you are not
going to get an HTML document to do this. Autorun that starts either an
application or a batch file. Of course the computer's bios have to be
set to allow boot from USB. You have more problem then just getting
someone to press the reset button. And before you ask, no you cannot
change a computer's bios with an html document for the same security
reasons.
 
M

Mussemouse

Ed said:
Well, the first issue is getting autorun to work on a USB memory drive.
MS says Windows does NOT support either booting from or autorun from a
memory drive.

http://www.microsoft.com/whdc/archive/usbfaq.mspx

However, I found a utility that does support this:

http://www.archidune.com/index.php?id=4

I've tested it and it works.

The second issue, as others have indicated, is:

Should an HTML page be allowed to run an executable? No. Will most
browsers allow this? No. You could use Active-X but that would require
Internet Explorer AND require that IE's security configuration be set up
to allow execution.

Further, even if IE is setup you will likely still present the user with
numerous (and possibly cryptic) security messages from IE. Not
user-friendly.

Finally, this all begs the questions:

- Why do you want to do this?
- What are you trying to achieve?
- How are you getting your files onto a USB drive and in the hands of a
user?
- Why reboot? The USB memory drive should autorun (using the APO USB
Autorun utility at the above link) when it is inserted into the computer.

If you can be more specific in what you're trying to accomplish, and
why, that would be really helpful.

Why I want to do this is simple.
Most people don't read a paper that instructs them how to do things.
When it shows on the monitor they do as they are told. Restart the computer
leave the USB drive in place and insert a bootable cd in the cd drive. If
the computer do not start from USB then in most cases it boots from the cd.

What I am trying to do is to get users that are not used to running anything
else than MS Windos to start up a USB drive with a system on it. A special
written system. As I have said I can write applications in assembler and C
but I do not know anything about HTML and Visual this or that.

So to get the user to do something that for most people are very simple is
sometimes very difficult. Like if the USB drive does not boot then insert a
cd. Boot from the cd. Well, this seems to be very difficult. So I was
thinking that if I show them a web page that tells them to insert the cd
then restart the computer it would be simple.
But it seems that even this simple task is to difficult for some. So a
button that tells them to click on it, the Windos style, and reboots the
computer would be a solution.
Well I have to figure out something else.
Thanks for all tip and all responses.

The system I am trying to get people to use is for a pure security issue.
Sitting alone and trying to figure out something that would be simple is not
always easy :D

//Micke
 
M

Mussemouse

Jonathan said:
The USB has a bootable OS? That is another issue. Still you are not
going to get an HTML document to do this. Autorun that starts either an
application or a batch file. Of course the computer's bios have to be
set to allow boot from USB. You have more problem then just getting
someone to press the reset button. And before you ask, no you cannot
change a computer's bios with an html document for the same security
reasons.

If I could in an easy way change the BIOS of the computer that would save me
a lot of headache but it's impossible since the addresses are not the same
in all BIOS's. This is close to impossible without a very advanced program
that can search for the BIOS id string and a database with all the
different values for different manufacturer of the BIOS.

But I think I go for only showing the info on how to do in the HTML document
and then hope that the users are capable of finding the restart function by
them selves in their system.
Thanks for all your replies. They have brought me new knowledge on what is
possible with HTML and what is not.

Cheers!
//Micke
 
M

+mrcakey

Mussemouse said:
Ed Mullen wrote:
<snip>

But WHY HTML?!!!! If you're computer literate enough to write your own OS
(!!!!) then you can find other solutions to the problem.

+mrcakey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top