Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Sunday, March 15, 2015

Auto Login into windows user accounts

The user account in any computer is a security measure but we tend to be always in a situation where we are sure that only we will be using and at time this security measure might become a bit tedious thing. So in order to remove this user Id login situation we can make achieve this using windows functionality,

Thursday, August 28, 2014

Change the version of Java to 1.7 when 1.6 is already installed

This post is to get knowledge on how to change the versions of java when there are multiple versions installed in any machine.

Platform : Windows 7
Java Versions installed : 1.6 and 1.7

We were facing an error when we tried to check the version of java from command prompt using the command "Java -version" the error seemed something like this,


One has to do the below steps to change the version of java to 1.7


  1. Open registry editor from Run window

  2. Go to the Java Run time environment from the tree of registry editor

  3. Check the current version

  4. Update the current version to 1.7

  5. Check the version from command prompt


Wednesday, August 27, 2014

Change Folder to ControlPanel

There are situations where you want to have your data secured. Hiding folder is typical way one would go for but everyone would be aware of un-hiding them. Here is one way of encrypting the data.

With this one can change the folder to control panel, technically you will use a bat file and change the folder to control panel. On double click of this folder, it would take you to control panel instead of taking to the folder contents.

Control panel will be identified using the keystring "21EC2020-3AEA-1069-A2DD-08002B30309D" in Windows XP and "ED7BA470-8E54-465E-825C-99712043E01C" in Windows 7. Do the below steps to change the folder to control panel.


  • Lets say you have a folder named "Example" in which you have some confidential information.
  • Open text pad and write the contents as given below
    ren Example ControlPanel.{ED7BA470-8E54-465E-825C-99712043E01C} 
  • Rename this file to <SomeFileName>.bat 
  • When you double click the file you can see that your folder "Example" will be converted to "ControlPanel"
Do the below steps to revert back to Example folder
  • Lets say you have a folder named "Example" in which you have some confidential information.
  • Open text pad and write the contents as given below
    ren ControlPanel.{ED7BA470-8E54-465E-825C-99712043E01C} Example
  • Rename this file to <SomeFileName>.bat
  • On double click this file you can see that your control pane will be converted back to "Example" folder.
Note : This post is only for those who are new to the computers and not meant to the people with average skills on internet browsing. 

Tuesday, March 11, 2014

My Gateway is unable to log in filesystem

Problem statement :

I have a custom gateway "sch.oauthint.OAuthHandler.wcp" and I can only debug via logging into filesystem (I know only this way of debugging :P unlike webservices which I can do it via eclipse). So I have encountered a strange problem as I saw there is an error in my application and I want to log. Whenever there is any error it logs in a file which starts lik "Gateway...." in my cordys logs folder but in this scenario I was not able to see the file at all. Hence a blocker for me to understand what is the issue. I have not observed this behavior when I do it in my local system. 

One Approach :

What our(me along with my colleague) understanding was that the user context with which it logs into file system was not having rights to write into file system and our understanding was right. Hence we need to give the rights to the folder "Logs" of the instance of cordys.

Below are the images which would help you in solving the problem :
First immediate task is to find out the user for your website. You can do it by going into IIS settings,


Default Web Site : Website where cordys is installed

You will be seeing "Authentication" as one of the artifact under IIS (highlighted)
Double click on that, You will be viewing a screen which is shown below








Now click on the Name which shows "Enabled" under status, in my case it was "Anonymous Authentication" now on the right side there are "Actions", click on the Edit to view the below screen.

 You will now be able to see what is the User with which it is trying to log.

"IUSR" in my case.Now the next immediate thing you have to do is to give the access permissions on folder "Logs" for this user. This step is shown below
Right click on the folder "Logs" under instance and click on sharing property. Give the access to the user you have found out above "IUSR" in my case.

You can view that in the following screen. 
When I have seen this option the access to the user "IUSR" was "Contribute"(I don't know what is the meaning of this option :P) but I have changed this setting to "Read/Write" which is when my problem got solved.


Note : However this was my approach of solving the problem. There might be different ways also to solve this problem (Windows user can be changed but I did not do that as this approach given me solution).  


Tuesday, February 11, 2014

How do I know which process is using which port

Recently I have encountered with a weird problem (Website is not being started) and there is an application error which is totally unclear to me. Just like any other person I have googled the error :P The interesting thing I have noticed is "Your website is not being started as there is some other application which is using port 80 (which is my website's port). ".

The explanation seems very clear but that won't solve my problem right :D
Now the task in my hand is " I have to find out the process which uses the port 80, which is very new to me." Finally I am able to achieve it and below was my approach.

Finding out which application is using port 80, One can find out using the command prompt what is the application's PID which is using port 80. A sample one is shown below





The results will show what is/are the application(s) which are using this port. In my example I searched the application which is using port "1521" and the screen shot shows the result. The command used to fetch the result is shown below

netstat -na|find "1521"

Give your port number instead of 1521. Now from the results you can figure out certain things, the third column will give the thing which you need. One of the result from the above is 

 TCP    192.168.10.127:1521    192.168.10.127:53710   ESTABLISHED

The highlighted column will convey everything, here in this case it is 192.168.10.127:53710

This 53710 is the PID of the process which is using this port.

From this I could able to find out the PID of the application which is using the port "80". Now I have to find out the process which is using this PID, this can be achieved by using task manager


From this I could understand that the application PID which I am searching is used by some other application which is "Skype", which is when I have realized that "Yes this problem occurred when I have installed skype". Normally I did not get any hint of how come skype will be the reason for this problem. What I did was just killed the skype application and then started the IIS. 

No wonder IT WORKED.










----------------------------------------------------------------------------------------------------
[Updated from here on 19th Nov 2014]
There is a software "ProcessExplorer" which is a freeware and which identifies the process with a specific PID. After you identifying the PID using the above process, run the procexp.exe and locate the process bearing this PID which you have recorded.



Now my next task is to try and identify what is the process which is bearing the PID : 4340 and from the above image I could see that it is a java.exe and I know that each cordys soap container will create a new java.exe and so I try to debug by looking into CMC (Cordys Management Console) which is an application which shows the container status and information about each container. Now try and locate the container which has the same PID as the one which you wanted (4340).

  
Its found out to be as LDAP. By this one could understand that LDAP is the java.exe which is running on a port which you are checking.

----------------------------------------------------------------------------------------------------------
Dated : 08-07-2015

You can find the PID directly from a port using below command,

netstat -ano|find "1521"

I wanted to kill this process and I could not find it in task manager. I killed it from command prompt using below command, 

taskkill/f /PID /7076

---------------------------------------------------------------------------------------------------------