2012-08-21

DefFactory.dat cannot be opened

I faced a problem while installing Visual Studio 2010.

The data file
'C:\Users\julien\AppData\Local\Temp\SIT37791.tmp\DefFactory.dat'
cannot be opened.

Solution :
Copy the following lines, and paste them into the above file.


[Version]
Signature = "$Windows NT$"
Provider="Microsoft Visual Studio 2010 Professional Edition - ENU"
Version=800.100.00
NullString=Null String
Lang=1033

[Scenario List]
vsscenario.dll

[Scenario Factory Information]
Default Scenario=11E4C8F3-425E-43b9-B689-8BFDF03342E2

2012-08-10

How to hide user accounts on Windows 7/Vista logon

I found user accounts on Windows logon after setting up the GIT service on my Windows box.
However, they are important to run GIT. So, I want to hide them.


  1. Run [regedit]
  2. Find the following key with [regedit]
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
  3. Add a new key under [Winlogon]
    1. Click right button on [Winlogon]
    2. Click [New]
    3. Click [Key]
    4. Type [SpecialAccounts]
  4. Add one more new key under [SpecialAccounts]
    1. Click right button on [SpecialAccounts]
    2. Click [New]
    3. Click [Key]
    4. Type [UserList]
  5. Add [DWORD (32bit) Value]s
    1. Click right button on right panel of [UserList]
    2. Click [New]
    3. Click [DWROD (32bit) Value]
    4. Type user account that you want to hide
    • Repeat this 4 steps as many as accounts that you want to hide
    • Make sure it is 0(zero). If this value is 1, you can see the user account on logon

2012-08-08

How to install GIT Server on Windows

As you know, GIT is one of source code management system. And it's ability includes a distributed revision control.
If you don't need any central integrated server, use only msysgit.
If you want to control GIT by GUI, use msysgit and TortoiseGIT that is front-end for msysgit.

The following instruction is how to install GIT repository server on Windows.

  • Summary
    • Setup
      • Install Cygwin
      • Setup SSH daemon
      • Add user for GIT service
      • (optional) Install Gitolite for managing accounts
    • Use GIT
      • Create Repository
      • Push project on developer's system
      • Download and install TortoiseGIT and MsysGit
  1. Install Cygwin
    • Download Cygwin installer on cygwin.com
    • Run setup.exe
    • Add [git] in [Devel] and [openssh] in [Net] and [python] in [Python]
  2. Setup SSH
    • Add Environment Variable
      • Select [Properties] on [Computer]
      • Click [Advanced system settings] on Control Panel > System and Security > System]
      • Click [Environment Variables...]
      • Click [New...] on System variables pannel
      • Type [CYGWIN] for [Variable name] and [ntsec] for [Variable value]
      • Click [OK]
    • Run [Cygwin Bash Shell] as Administrator
      • $ ssh-host-config  <= setup sshd
      • Answer [yes] for most questions
      • Answer [no] for question about using a different username for running the service
      • $ cygrunsrv -S sshd  <= run sshd
  3. Add user
    * There are no users in Cygwin that do not exist in Windows first. Create the Windows user first then use mkpasswd to add that user to /etc/passwd.
    • On Control panel
      • Control Panel > User Accounts and Family Safety > Add or remove user accounts
      • Create a new account
    • On command prompt
      • $ net user git password /add /yes
      • $ net localgroup <an_local_group> git /add
      • $ mkpassd -l -u git >> /etc/passwd  <= on Cygwin shell
      • Update git's home directory to /cygdrive/d/git-repository in the file /etc/passwd <= d is hard disk drive
  4. Add public key
    • $ ssh-keygen
    • $ cd .ssh
    • $ cp id_rsa.pub /tmp
    • runas /user:git c:/cygwin/cygwin.bat <= on windows command prompt
    • $ cp /tmp/id_rsa.pub ~/.ssh/authorized_keys
  5. Use Git
    • Create repository
      • login as git
      • $ mkdir PROJECT.git
      • $ cd PROJECT.git
      • $ git --bare init
    • Push project
      * in the project folder
      • git init
      • git add .
      • git commit -m 'initial commit'
      • git remote add origin git@[SERVER_NAME or IP]:PROJECT.git
      • git push origin master
    • Pull project
      • git clone git@[SERVER]:PROJECT.git