nighttrain's Profile User Rating: -----

Reputation: 5 Worker
Group:
Active Members
Active Posts:
285 (0.22 per day)
Joined:
22-September 10
Profile Views:
3,711
Last Active:
User is offline Mar 24 2014 08:43 AM
Currently:
Offline

Previous Fields

Country:
PL
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Volkswagen
Dream Kudos:
0
Icon   nighttrain still drilling

Posts I've Made

  1. In Topic: Create windows account and login to windows with C#?

    Posted 19 Mar 2014

    Write inside run box "gpedit.msc" to start app before login those steps:
    Start --> Run --> gpedit.msc --> Local Computer Policy --> Windows Settings --> Script (Startup/ShutDown),
    
    


    Then add you .exe It will launch Before login. Do not try more in Group Policy, it may happen harmful for System

    By Programmatic logic, Try with registry key this value is updating in registry, by our program we can update directly registry then we can call application

    In the other hand before login no user is assigned so from someone claims even Windows Service will not run as from Microsoft docs its not more that application (service windows). You can consider to add your app to Startup folder so it will be executed as well firstly.
  2. In Topic: Static class for logging

    Posted 19 Mar 2014

    Is my last code now thread safe?
  3. In Topic: how to create patches in .net

    Posted 18 Mar 2014

    Take a look at that:

    How to: Manage Updates for a ClickOnce Application:
    http://msdn.microsof...y/1zyc39fb.aspx

    ClickOnce Deployment:
    http://msdn.microsof...28VS.80%29.aspx
  4. In Topic: Create windows account and login to windows with C#?

    Posted 18 Mar 2014

    You can do this taking three parameters within: user name, required password and home folder to your user:

    public void CreateLocalUser(string username, string password, string homedir)
      {
      if (!Directory.Exists(homedir))
        Directory.CreateDirectory(homedir);
    
      Process MyProc = new Process();
      MyProc.StartInfo.WorkingDirectory = @"C:\WINNT\SYSTEM32";
      MyProc.StartInfo.FileName = "net.exe";
      MyProc.StartInfo.UseShellExecute = false;
      MyProc.StartInfo.RedirectStandardError = true;
      MyProc.StartInfo.RedirectStandardInput = true;
      MyProc.StartInfo.RedirectStandardOutput = true;
      MyProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    
      MyProc.StartInfo.Arguments = @" user " + username + @" " + password + @" /ADD /ACTIVE:YES " +
        @"/EXPIRES:NEVER /FULLNAME:" + username + @" /HOMEDIR:""" + 
        homedir + @""" /PASSWORDCHG:NO /PASSWORDREQ:YES";
    
      MyProc.Start();
      MyProc.WaitForExit();
      MyProc.Close();
      }
    
    


    cmd usage: net user [username] [password] /ADD - above works mostly same way.

    Hope it will help you.
  5. In Topic: Static class for logging

    Posted 18 Mar 2014

    Exactly I decided to make my own - could you please tell me after my modification of lock within couple places is that now ok?

My Information

Member Title:
D.I.C Regular
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Poland
Full Name:
Bob
Years Programming:
4
Programming Languages:
VB,NET, C++, C#, PHP, HTML, JS, CSS, Pascal,

Contact Information

E-mail:
Click here to e-mail me
ICQ:
ICQ  637172526

Friends

Comments

Page 1 of 1
  1. Photo

    FlashM Icon

    24 Sep 2010 - 14:17
    no problem... you're welcome anytime...
Page 1 of 1