hi,
when i ask my program to restart the PC by Code ((Shell "Shutdown -r -f -t 0"))
it's open again up to the login windows
I need the code which allow me to send the ctrl+alt+Del to open the windows to complete my instantiation and running the program
can anyone help me.
thanks
12 5363
I think the whole reason MS used the Ctrl-Alt-Del sequence at startup was to prevent programs from doing that without user intervention. Or to put it another way, I don't think you can.
I could be wrong, of course.
hi,
when i ask my program to restart the PC by Code ((Shell "Shutdown -r -f -t 0"))
it's open again up to the login windows
I need the code which allow me to send the ctrl+alt+Del to open the windows to complete my instantiation and running the program
can anyone help me.
thanks
You can restart windows by code without sending "Ctrl+Alt+Del" combination key.
Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Boolean
Public Const EWX_SHUTDOWN = 1
Public Const EWX_REBOOT = 2
Public Const EWX_LOGOFF = 0
To restart window:
Dim ret As Boolean
ret = ExitWindowsEx(EWX_REBOOT,0)
You can restart windows by code ...
Are you saying this will make Windows restart and log on again automatically, without user input?
Are you saying this will make Windows restart and log on again automatically, without user input?
Thanks for all of u
I mean really that reopen the windows automatic after I send the parameters with the User and Password,
As if you open the computer from Symantec pcAnywhere or Logmein.
I rather if you can visit www.Logmein.com to know what I am looking for
ex. I need code to let me open the windows from the user and password as when u press Ctrl+ alt+ del when you login (with domain ) not a sample user
best wishes
I mean really that reopen the windows automatic ...
Surely any program you have running will be killed when you restart the pc...? So your code won't be running even if you could send ctrl-alt-del?
Are you saying this will make Windows restart and log on again automatically, without user input?
There is no way to logon automatically after restarting Windows. After restarting, Windows need user input Username and password to complete logon. If your computer has only one active user (except Administrator and Guest - thats often disabled), and this user has not password protected, the windows will automatically logon to this account. But if the windows has more User, it cant be logged on untill has user input.
If you want keep program still running, there is one complexibility technique that store all ram memory into hard disk. The next time windows logged on, you must manually copy data from harddisk into ram memory, so the program continue running. ( This is complexibility technique, so there is no more people can do that.)
If you just want open again your program after restarting windows (do not keep its running status), so the Setup program must store a Key in to Registry (at: HKLM\Software\Microsoft\Windows\CurrentVersion\Run ). This key has type of String, and its value must be the full path to Executeable file (you maybe want it point to your program). If you want your program continue running at startup, so do nothing, otherwise, remove this key at the first running of application.
Note: with this method, your program just be opened after the windows logged on and it runs in the starting point ( cannot keep running status ).
Dont try logon to windows without user input. Microsoft will not give you permission.
There is no way to logon automatically after restarting Windows. ...
That was my point. The OP was asking how to bypass the manual logon process. I didn't think you could.
... Dont try logon to windows without user input. Microsoft will not give you permission.
Yeah. Even when Windows Update installs an update and reboots, you have to go through the usual logon process. If MS won't even let themselves do it...
Yeah. Even when Windows Update installs an update and reboots, you have to go through the usual logon process. If MS won't even let themselves do it...
Of course they can do. But they don't do that. Windows Update often takes a long time to download and install into machine. Imagine that, you let Windows automatically download and install the update, meanwhile, you go out for a cup of coffee. When you come back, the update process has completed and Windows automatically logged on. There may be many users who can use your computer and do things that are harmful to your computer.
Of course, hackers can use some techniques to logon to the computer without knowing your password. But that's Microsoft's security. Windows is their product and they know how to log on without user input.
You were wrong if you said that: "MS won't event let themselves do it"
when i ask my program to restart the PC by Code ((Shell "Shutdown -r -f -t 0"))
it's open again up to the login windows
I need the code which allow me to send the ctrl+alt+Del to open the windows to complete my instantiation and running the program
Hi mfibrik,
This isn't an exact answer to what you've asked. As others have mentioned, being able to bypass Ctrl+Alt+Del without action from a person would be a security flaw. Am I right however, in assuming that what you're really trying to do is get a program to start up automatically when you restart a computer?
That can be done in a number of ways.
1. Create a windows service to start the app. You could use a method like the one described here, which lets you create custom services for applications: http://www.tacktech.com/display.cfm?ttid=197
2. Configure an account to log in automatically, then write a script (Windows logon or startup) to start the program then lock your computer so it isn't sitting there logged in.
For autologon there are two methods here: http://windowsxp.mvps.org/Autologon.htm
The first one worked fine for me when I tested it. I made an account called AutoLogon to test it with first:
Click Start, Run and type CONTROL USERPASSWORDS2, and click Ok. Select the user account from the list (the account to which you want to automatically logon). Uncheck Users must enter a user name and password to use this computer option, and click Ok. Type the user account password and complete the process.
You can always log off the account and log into another, once you've set this up. Also, you can hold Shift while Windows is loading to cancel the autologon.
Here's an example script that starts Notepad (replace with the path to your application), then locks your computer. Copy this into a text file, save it as something like loadAppAndLock.vbs, then put a shortcut to it in the Startup folder for the account that will log on automatically. Alternatively, you could just put a shortcut to your application in the Startup folder too and ommit lines 10, 11, 15 and 16. -
' loadAppAndLock.vbs
-
-
' Opens APPLICATION_NAME then locks the workstation.
-
' Author: Chris Fry, Canberra, Australia
-
' 25th October, 2007
-
' -----------------------------------------------------'
-
On Error Resume Next
-
-
'Change this to your application path
-
CONST APPLICATION_NAME = "C:\WINDOWS\system32\Notepad.exe"
-
-
Set objShell = CreateObject("Wscript.Shell")
-
-
'Start application
-
objShell.Run APPLICATION_NAME
-
-
'Lock computer
-
objShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"
-
-
'End of loadAppAndLock.vbs
-
One concern with this method is that there is a period of time between when the logon happens and the lock where your computer will be logged on and presumably unattended. Do some tests and decide if it's appropriate for your situation. For me it's about 5 seconds.
Add a post if you'd like any further clarification.
Hope that helps,
Chris Fry
Canberra, Australia
Thanks for the info, Chris. I'm sure many of us (myself included) will find it useful.
A couple of minor corrections - I tried the "shift" thing to stop auto logon, but it didn't work for me :-)
It probably either only works with the second auto logon method on the site I referenced using the Tweak UI PowerToy (I haven't tried that) or requires a PS2 keyboard.
Also, the omissions to get rid of the application start up should have been lines 9, 10, 14 and 15.
Chris
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Ciaran |
last post by:
Hi All,
I have created a Windows Service. In the event of an Exception
occuring I would like to notify Windows to restart the service
as shown below:
<snip>
protected override void...
|
by: Bonj |
last post by:
Right guys.
(I would like a solution to this in VB6 as this is what our needy app is
written in, but any solutions that involve .NET would be much appreciated
likewise as I could instantiate...
|
by: carmen |
last post by:
Hi,
I have searched through msdn documentation, but couldnt figure this
out. I have written a console application that starts a process using
the Process class in system.diagnostics namespace. I...
|
by: Maximus |
last post by:
Hi everybody,
Has anyone changed the session state in web.config programatically
through the applications. Any Help will be appreciated.
Thanks.
|
by: vickaiser1 |
last post by:
I am creating a setup project for an application and need to edit the
Metabase.xml file during setup. Does anyone know of a way to stop and
then restart services programatically before and after I...
| |
by: shai |
last post by:
I am working at .net 1.1, writing in c#.
I have windows service with a COM object.
Every unexpected time The COM object throw an error that make my service get
stuck (do not respond).
I can catch...
|
by: carson |
last post by:
I have written two windows services:
- service A does some crunching of local data files and uploads them to
a central processing computer via http.
- service B monitors a manifest file on a...
|
by: Simon Harvey |
last post by:
Hi all,
Can anybody tel me how to programatically kill my service when an
exception occurs?
Whenever something bad happens I'd like to shut it down.
Also, is there a way to programatically...
|
by: The Mad Ape |
last post by:
Hi
I have code to programatically create a label. It works but when I try
to call a sub to create a tooltip it does not work. I do not get an
error so have no idea what it wrong. Please review...
|
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,...
|
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,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |