to shut down windows by ending a vb.net program

A

andrews

Is it possible to run a vb.net program and when it ends (there are many
calculations) to shut down windows(for me windows 7)in the program in
the last program line?
And how to do this?
Thanks for any response
 
A

andrews

From the URL site, I am afraid that it is not possible.
The user has to confirm the question posed by windows self.
Thanks any way
 
M

Mr. Arnold

andrews said:
From the URL site, I am afraid that it is not possible.
The user has to confirm the question posed by windows self.
Thanks any way

I think you can suppress the message. That's just one example -- use
Bing or Google. And besides, I don't think you're going to be able to
shutdown Win 7 without some kind of Administraton confirmation.
 
C

Cor Ligthert[MVP]

I hope so

Mr. Arnold said:
I think you can suppress the message. That's just one example -- use Bing
or Google. And besides, I don't think you're going to be able to shutdown
Win 7 without some kind of Administraton confirmation.
 
M

Michel Posseth [MCP]

ahum....... well ther are ways to detect that the dialog is shown and there
are ways to send the confirmation ...
 
F

Family Tree Mike

Is it possible to run a vb.net program and when it ends (there are many
calculations) to shut down windows(for me windows 7)in the program in
the last program line?
And how to do this?
Thanks for any response

This may be "so 1980's", but, what about a batch file to run your
application, then call shutdown from the batch file. At least when I
execute shutdown from the command line on vista, I don't get the prompt
you are worried about. I don't have a Win7 machine.
 
A

Appr3nt1c3

Is it possible to run a vb.net program and when it ends (there are many
calculations) to shut down windows(for me windows 7)in the program in
the last program line?
And how to do this?
Thanks for any response

Take a look at this. I have used this code in vb .net 2005, winxp and
it works. Haven't tried it on vista and win7 though...

http://www.mentalis.org/soft/class.qpx?id=7
 

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

Top