A sliding window lock is a great item if you've got children or pets as it allows you to lock windows partially open so that you can still enjoy fresh air without having to worry about anyone escaping. Here are a few steps on how to repair a faulty sliding window lock.
Step 1 - Inspect the Window Track
If there is anything blocking the track that the lock slides along, you will not be able to lock the window where you want. If you see debris on the window track, remove it with your hands or use a small brush to sweep it.
If your lock is not sliding, the problem might be the track. If the frame is not completely straight, take your small hammer and gently tap it back into shape. If you can't get it quite to where it should be, you may need to replace the entire window frame.
Step 3 - Replace the Lock
The sliding window lock itself might be broken if the window looks fine. Use a screwdriver to unscrew the lock and then simply replace it with a new one, which you can buy in any home improvement store.