nikhil joshi
system
This category is about windows core components like services, files system etc
Small command to open windows share
Jun 18th
Command is “net use”. This will open the shared folder
net use \\10.70.0.177\software /user:doamin\nikhil
If this command is used with * it will map drive to shared folder.
net use * \\10.70.0.177\software /user:doamin\nikhil
Building OpenSSL on Windows using Visual C++ (6.0)
May 13th
Hi its all about building OpenSSL on Windows using Visual C++ (6.0)
Requirement,
Visual c++ 6.0
VC Service pack 5 (not a 6)
Visual C++ 6.0 Processor Pack
Active Perl
Pre build info :
Package(general source) : http://www.openssl.org/source/
Unpack to: C:\build\openssl
Installation folder: C:\www\openssl ( use command mkdir C:\www\openssl)
openssl.cnf location : C:\www\openssl\bin
Build:
1. cd /d C:\build\openssl2
2. perl Configure enable-camellia –openssldir=C:/www/openssl VC-WIN32
3. ms\do_masm
4. nmake -f ms\ntdll.mak
Test the build:
nmake -f ms\ntdll.mak test
Install:
nmake -f ms\ntdll.mak install
Add OpenSSL to the PATH:
Set PATH under Start » Settings » Control Panel » System » Advanced » Environment Variables » System variables
Add C:\www\openssl\bin in Path verialbe
Reboot the machine (for Environment Variables):
Test installation:
1. openssl version
2. openssl s_client -connect www.openssl.org:443
3. GET / HTTP/1.0 [Enter twice]
For more info visit http://www.devside.net/guides/windows/openssl
create windows service
Nov 6th
For creating windows service the easy way is use “windows service” project template, and use installutill to install the service. I am using Visual studio 2005 Professional Edition.
1. Create service
- Create “windows service” project. Lets say ‘TimeServer’
- ‘TimeServer’ contains two files ‘Service1.cs’ and Program.cs’
- Change name of ‘Service1.cs’ to “TimeServer.cs” (as I don’t like old name)
- You need to add new code to following functions.
- OnStart() – here add the code for starting the service
- OnStop() – here add the code for stopping the service
- InitializeComponent() – change the name of service.
- For installation part of service you will need to add installer code for that
- Add New item and choose “Installer Class” change its name to ‘program installer’
- In this you need to specify installation details for service by using ServiceProcessInstaller and ServiceInstaller
- In InitializeComponent(); we are creating objects for this and assigning values like user name password etc..
- It is pretty simple you can refer the code attached.
2. Install created service.
- When you build the project it will create a ‘TimeServer.exe’. You will need this exe to install and run the service.
- Copy that exe to other location like c:\testTimeServer
- From command line use following command to install service
- C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>InstallUtil.exe “C:\testTimeServer\TimeServer.exe”
- To uninstall use C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>InstallUtil.exe /u “C:\testTimeServer\TimeServer.exe
3. Debug installed service
- Attach TimeServer process to project.
Recent Comments