2013. 11. 22.

How to Configure firewalls by command line in windows

When your application use network,  user will meet the 'Firewall warning messages' . If user ignores it, your application cannot work properly.   Even if your program is used by many people and  it is distirbuted automatically.  You must make firewall allows your application.

This batch file is about configure firewall.


1) XP Case 

firewall.bat  file

rem delete previous configuration to prevent duplicate2)
netsh firewall delete allowedprogram c:\myapp\myapp.exe
rem add myapp.exe to allow list.
netsh firewall add allowedprogram c:\myapp\myapp.exe Myapp-firewall enable



2) Windows 7 Case


REM *** Delete previous firewall config. ***
netsh advfirewall firewall delete rule name=MyAppfirewall

REM *** allow inbound ***
netsh advfirewall firewall add rule name="MyAppfirewall" dir=in protocol=tcp action=allow program="c:\MyApp\MyApp.exe"
netsh advfirewall firewall add rule name="MyAppfirewall" dir=in protocol=udp action=allow program="c:\MyApp\MyApp.exe"

REM  *** allow inbound  ***
netsh advfirewall firewall add rule name="MyAppfirewall" dir=out protocol=tcp action=allow program="c:\MyApp\MyApp.exe"
netsh advfirewall firewall add rule name="MyAppfirewall" dir=out protocol=udp action=allow program="c:\MyApp\MyApp.exe"

2013. 11. 21.

Verify OS Version in Windows System by command line

ver | find "XP" > nul
if %ERRORLEVEL%==0 goto _XP

:_XP 
   echo "this is XP" 
   goto end

: NONXP
   echo "this is not XP"

: end


Line 1:  ver  displays version 

       win7 case -->  Microsoft Windows [Version 6.1.7601]
       winxp case  -->Microsoft Windows XP [Version 5.1.2600]

Line 2:  dedepends of result,   do somthing,.  

2013. 11. 10.

Changing Metadirectory _svn to .svn in subversion client (ASPDOTNETHACK / SVN_ASP_DOT_NET_HACK)

While copying  repository , I found that _svn and .svn directories are same folder.
_svn is created automatically. So, I remove it but it was created by something...

Because I know that this is alternative way  for .net web servers.  
I did googling. and  I found it that How to fix it.

1) check system environment varialbes
    - run command prompt.
    - type set
    - you will find  ASPDOTNETHACK or  SVN_ASP_DOT_NET_HACK

2) remove it form 'my computer properties'
       --> advanced system configuration
               --> environment variables
               --> remove this variable

3) reboot your computer.

4) try again copy svn-directory
Enhanced by Zemanta

2013. 11. 1.

How to use CX_oracle module at Pyhon in Windows64

Four components to use oracle module in pythone of window.

1) python
2) oracle module
3) windows.
4) oracle Driver (Oracle clients)

You will meet errors on using oracle module at  python2.7, if you run it in windows64 because of some reason.

You must consider something...

Follow below step

1) install python 2.7.x  32bit
2) install oracle module  32bit
3) install oracle driver 32bit
    - At this step  I had troubles.  Becuase I 've installed 64bit oracle drivers for other programs.
   - You don't need to uninstall it but you must change environment variables.
   - ORACLE_HOME  : change to 32bit oracle client root
   - PATH : change to 32bit oracle client root . You must changed both of them.

4) window os 32 bit or 64 bit  , anything is OK.

I wish You could run it.

Breakfast in the aquarium

My House,
In the morning.~