Whether an installed game works when you move your hard drive depends on the installation type.
Moving a hard drive between consoles can cause license/recognition issues even with disc-based installs. Sharing physical discs is the most reliable method.