
An air conditioner in a window means that window no longer locks. The sash lock cannot engage with the lower sash propped up, the thin side panels are the weakest part of the opening, and both stay that way for as long as the unit is in. Secure an AC window with a pin lock or track stop through the sash, reinforce or replace the side panels, and add an approved guard where the opening is reachable.
Central air is the exception in New York City housing. Most apartments and walk-ups are cooled by units sitting in double-hung windows, and many stay in all year because there is nowhere in a small apartment to store one. That makes a semi-permanent hole in the building skin in a city where ground-floor, airshaft, and fire escape windows are genuinely reachable.
It is also a problem nobody treats as a lock problem. People upgrade the entrance door and fit a better cylinder, then leave a window a few feet away held open by an appliance. This is the opening that improving apartment door security usually misses.
A double-hung window locks with a cam latch that pulls the upper and lower sashes together where they meet. With a unit in the opening the lower sash sits several inches up and the two halves never meet, so the latch has nothing to catch. The window is not unlocked by accident. It cannot be locked at all.
The accordion panels that come with a unit are thin plastic meant to block air, not force. They flex, pop out of their channels, and on an older unit are often brittle or cracked. Nobody at the window needs to move the air conditioner; the panel beside it comes out quietly. The panels, not the unit, are the opening.
A unit resting on the sill with no brackets and no screws through the mounting rail can be worked loose from either side. That matters for security, and it matters far more for safety: an air conditioner over a sidewalk or a courtyard is a falling hazard, so brackets are not optional on an upper floor.

You are not trying to make the window latch, because it will not. You are stopping the sash from being lifted and the side panels from being removed.
These are small jobs. If you would rather not drill into a window in a rental, a locksmith can fit sash pins, keyed window locks, and stops in one visit, and will say which ones your lease allows.
If the window opens onto a fire escape, it is an exit before it is a window. Nothing may block it: no fixed grille, no padlock, no bar screwed across the frame, and no installation that stops the window being opened from the inside. The only acceptable barrier is an approved fire escape window gate that releases from the inside without a key or a tool. The distinction, and how inspectors treat it, is in window gates and fire escape lock requirements.
An air conditioner in a fire escape window is its own problem, because a unit bolted into an egress window is an obstruction in a fire. Where a window serves as an exit, put the air conditioner in a different opening if you have one.
November is when these units come out, and it is the best security maintenance of the year, because the opening closes completely for five months. Do the part that gets forgotten:
If the window will not latch once the unit is out, fix it now. A window that cannot be locked is worse in winter than in summer, because nobody opens it and nobody checks it. The same applies before you leave town, which is on the list in the holiday lock security checklist.

Not every window needs the same treatment. Rank them by whether a person can stand in front of one.
The broader rundown of hardware for each type is in window lock security for NYC apartments.
We fit sash pins, keyed window locks, track stops, and approved window gates across Brooklyn, Manhattan, Queens, the Bronx, and Staten Island. Licensed, insured, and available 24 hours.
In a rented New York apartment the window and its hardware are the owner's responsibility to maintain, so a broken or missing sash lock is a repair request, not a purchase. Put it in writing to the super or managing agent and keep a copy, because the paper trail is what makes the request enforceable later. A building with a history of unresolved complaints shows it in the public record, which is the point of HPD violations for door and lock conditions.
Window guards are a separate matter. Where a child ten years old or younger lives in an apartment in a multiple dwelling, the owner is responsible for installing window guards, and an air conditioner does not substitute for one. Requirements depend on the building and change over time, so confirm what applies to your apartment with the Department of Housing Preservation and Development rather than relying on what you are told in a hallway. The child-safety side of apartment hardware is covered in child-safe apartment door and window hardware.
Tenants may usually add non-destructive hardware such as stops and wedges, and should ask before drilling. If a window has already been forced, work through what to do after a break-in before repairing anything.
Twice a year, when the units go in and when they come out, walk every window and ask four questions: can this sash be lifted from outside, are the side panels rigid and fixed, is the unit screwed to its brackets, and if this window is an exit, can I open it instantly from inside? Anything that fails one of those is a short job. In Brooklyn we cover the whole borough, from brownstone rear windows to high-rise setbacks, through our Brooklyn locksmith service.
Not with the window's own lock. A sash lock works by pulling the two sashes together, and an air conditioner holds the lower sash permanently open, so the latch has nothing to engage. The window has to be secured a different way: a pin or a track stop through the lower sash and the frame, a keyed sash lock set at the height the sash actually sits, or a guard across the opening. Treat the AC as hardware that disables the lock, not as something that fills the gap.
If you can store it, yes, and not only to stop cold air. Pulling the unit lets the window close and latch properly for five months. The step people skip is checking the lock afterward: a sash held open all summer often will not latch without a shove, and the lock may be painted, bent, or missing screws. Close the window, throw the latch, and fix it then rather than in January.
Only an approved type that releases from the inside without a key or a tool. A fixed grille, a padlocked gate, or a bar screwed across a fire escape window blocks an exit and is both dangerous and a violation. Never put a padlock on one, and never let an air conditioner obstruct a window that serves as a means of egress.
Less of one, but not zero. The common high-floor route is not the street but a fire escape, an adjoining roof, a setback, an airshaft, or a neighbor's terrace, and an AC window reachable from any of those is as open as a ground-floor one. The other high-floor risk is the unit falling, so brackets and support matter as much as the lock does.
In a rented apartment the window and its hardware are the landlord's responsibility, so put the request to the super or managing agent in writing and keep a copy. If you own the unit, or you want the window secured the same day, a locksmith can fit sash locks, pin locks, keyed window locks, and track stops. Emergency Locksmith NY answers 24 hours a day at (718) 412-1332.