you have to set LM_LICENSE_FILE (or the other variable) to the location of your license. you could put it in c:\altera\license.dat then right click on My Computer, go to Properties, the Advanced Tab, then Environment Variables. create a new one called LM_LICENSE_FILE and set the value to c:\altera\license.dat or what ever the location is of your license. if you create it as a User variable it will only be available to you, if its System it will be set for all users.
if you need information try the Quartus II Installation and Licensing Guide or AN340.