Hello
i trying to shut down window using vb. i able to restart and log off, but was unable to shut down. when excute the shut down command , nothing happend. it related to window os security issue?
8 1960 sashi 1,754
Recognized Expert Top Contributor
Hello
i trying to shut down window using vb. i able to restart and log off, but was unable to shut down. when excute the shut down command , nothing happend. it related to window os security issue?
Hi there,
What is the exact error message as well as error code / number?
sashi 1,754
Recognized Expert Top Contributor
Hello
i trying to shut down window using vb. i able to restart and log off, but was unable to shut down. when excute the shut down command , nothing happend. it related to window os security issue?
Hi there,
Kindly refer to below attached code segment, hope it works. Good luck & Take care. -
Call Shell("Rundll32.exe user,exitwindows")
-
Hi there,
Kindly refer to below attached code segment, hope it works. Good luck & Take care. -
Call Shell("Rundll32.exe user,exitwindows")
-
i executed the command, odd thing is nothing hppend and no error message prompt out!..
i be able to log off and restart, but only shut down. refer to some text. shut down function are related to system security? have to set it? any idea?
i executed the command, odd thing is nothing hppend and no error message prompt out!..
i be able to log off and restart, but only shut down. refer to some text. shut down function are related to system security? have to set it? any idea?
Mushi mushi...please try this command:
rundll32.exe user.exe,exitwi ndows
sashi 1,754
Recognized Expert Top Contributor
Mushi mushi...please try this command:
rundll32.exe user.exe,exitwi ndows
Hi there,
It's exactly same as above, anyway, wish you guys good luck with this experiment. Take care.
sashi 1,754
Recognized Expert Top Contributor
i executed the command, odd thing is nothing hppend and no error message prompt out!..
i be able to log off and restart, but only shut down. refer to some text. shut down function are related to system security? have to set it? any idea?
Hi there,
Kindly try the below code segment, hope it helps. Good luck & Take care.
Shutdown -
shell "shutdown -s -f -t 0"
-
Restart -
shell "shutdown -r -f -t 0"
-
Logoff -
shell "shutdown -l -f -t 0"
-
Hi there,
Kindly try the below code segment, hope it helps. Good luck & Take care.
Shutdown -
shell "shutdown -s -f -t 0"
-
Restart -
shell "shutdown -r -f -t 0"
-
Logoff -
shell "shutdown -l -f -t 0"
-
Thank a lot Sashi -
shell "shutdown -s -f -t 0"
-
above the only code gv what i want. thanks
sashi 1,754
Recognized Expert Top Contributor
Thank a lot Sashi -
shell "shutdown -s -f -t 0"
-
above the only code gv what i want. thanks
Hi there,
I came out with another method to shutdown windows, maybe you might want to check out the code at below attached link, hope it helps. Good luck & Take care. Shutdown Windows Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Claire |
last post by:
Running XP pro, SP2. Visual studio .NET 2003. App written in C#
I have written an application that hides itself when run and shows a
notification icon in the system tray.
If the main form is visible/restored to the desktop, and I tell windows to
restart, windows shuts down fine.
If the main form is minimized to the tray and I tell windows to restart,
other desktop apps close down fine but my program's icon remains sat in the
system...
|
by: Diogo Alves - Software Developer |
last post by:
Hi,
I have a application developed by me in C# that does not let windows shut
down!
What is the problem? is this a Framework bug?
I would like to receive some feedback about this issue
|
by: Anders Both |
last post by:
If no pages in my asp.net web-system, is being requested for some periode,
it seems like the asp.net process is shut down automaticaly. Is this a
normal behavior, or does my system contains some kind of bug or wrong
configuration ?
I don´t want my asp.net process to ever shut down, because I want to keep
data, object etc, in ram.
I hope someone can give me good advices.
|
by: nikola.bucic |
last post by:
Is there any code so that I can call shut down dialog box from my
program?
Under shut down dialog box I mean the one that is shown when you click
on Start -> Shut Down.
Thanks in advance.
|
by: ArkJ |
last post by:
Hello.
I have a little problem. I created a little Service which uses SIP, all works rather well, but when I want to shut it down in the Services panel, it looks as if it's shut down, but in fact it's not:
- when I try want to delete the .DLL file, I can't: the file is still locked
- if I "Start" my Service again, it refuses
I have to wait like ~20s, and then it is really shut down.
When I shut down the Service, and then try to Start it...
| |
by: sashi |
last post by:
Shut down Windows
For various reasons you may require a shut down of Windows to happen programmatically. For instance if the installation of your program requires system reconfiguration. The following code will do this for you with options to Reboot, etc.
'Module code - modShutdown
' Shutdown Flags
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
|
by: TC |
last post by:
I'm confused about the proper way to shut down my application.
I have a form which instantiates a control, which instantiates another
control, which instantiates yet another control that runs a time-
consuming loop. I put Application.DoEvents() into the loop so the user
can continue to work on the form while the loop is running. Everything
works great until the user wants to exit the application. The
application will not close until the...
|
by: pravin kumar S |
last post by:
I Devlop one window appliction so in the window cross(X) buton the application asking about the password if it match the close window else give the error..
so when i went to client the client ask me if computer is going shut down due to some reason in this case password should not varify ...so how to trap this problem
|
by: =?Utf-8?B?R2xlbm4=?= |
last post by:
i just upgraded from XP to Vista and so far am kicking myself for it. After I
installed and got all my drivers updated i went to shut down windows and it
will not shut down. It closes all programs goes to the shut down screen and
then turns black and I get the blue screen of death. The pc then reboots.
Everything seems to be working proprerly and it is running great, I just have
this one issue. If anyone has any ideas I would love to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |