Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Windows WinForm
Hello Experts
 
I had lots of search with many different search keys to find out my answer in Internet; but couldn't find any code to Start Windows (Not My Windows Application) at specified DateTime without enter windows password.
 
The only result of my searches is setting registry key to start windows automatically after windows shuts down(With entering no password too).
class RegisteryWriter
{
    public static bool WriteDefaultLogin(string username, string password)
    {
        const string subKey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon";
 
        RegistryKey registeryKey = Registry.LocalMachine.CreateSubKey(subKey);
 
        if (registeryKey == null)
            return false;
        else
        {
            registeryKey.SetValue("AutoAdminLogon", "1");
            registeryKey.SetValue("DefaultUserName", username);
            registeryKey.SetValue("DefaultPassword", password);
            registeryKey.Close();
            return true;
        }
            
    }
 
    public static bool RemoveDefaultLogin()
   {
       const string subKey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon";
 
       RegistryKey registeryKey = Registry.LocalMachine.CreateSubKey(subKey);
 
       if (registeryKey == null)
           return false;
       else
       {
           registeryKey.DeleteValue("DefaultUserName", false);
           registeryKey.DeleteValue("DefaultPassword", false);
           registeryKey.DeleteValue("AutoAdminLogon", false);
           registeryKey.Close();
           return true;
       }
    }
}
 
Please help me with your patience.
I will be thankful of your help.
 
Good Luck
Posted 25-May-13 23:31pm
Edited 25-May-13 23:36pm
v2
Comments
tumbledDown2earth at 26-May-13 4:34am
   
you forgot your poser switch :P
Meysam Tolouee at 26-May-13 4:37am
   
I forgot what?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

And how do you think that is going to work?
 
When windows shuts down, it turns off the power to the processor, so no software is running.
 
If no software is running, it cannot check the time, or read the registry
 
If software can't check the time or read the registry, it can't start the system....
 

Which is why you couldn't find anything on the net to start a computer from your software: it can't be done.
  Permalink  
Comments
Meysam Tolouee at 26-May-13 4:52am
   
I do not want to use these typical ways that you named. As Windows can do this so I want to find a way to access the windows setting. I will find it some how. I just want help to do it as soon as possible! So what do you think now?
Meysam Tolouee at 28-May-13 2:55am
   
I have already found a class named "Win32_ScheduledJob" but I couldn't use it. can this class help me?
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394399(v=vs.85).aspx
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You need to use another computer which can manage power to the parent computer. You have to trigger and event to the smps of the parent computer and start it up.
 
Even then you would need a pulse trigger mother board circuit
 
This is the most you can do I guess...
  Permalink  
Comments
Meysam Tolouee at 28-May-13 2:53am
   
I have already found a class named "Win32_ScheduledJob" but I couldn't use it. can this class help me?
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394399(v=vs.85).aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 304
1 Sergey Alexandrovich Kryukov 255
2 Maciej Los 250
3 Shweta N Mishra 216
4 PIEBALDconsult 174
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,665


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 27 May 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100