Inactive Application when copied to Hard Disk
Hi, I'm a newby here.
I searched the threads and found the following code to make the Application to run only from CD ROM while making inactive when it's copied to Hard Disk.
var drive = new Drive((new Folder(getAppDir())).drive);
trace(drive.driveType);
if (drive.driveType != "cdrom")
{
Dialogs.msgBox("Sorry, I cannot be run from HD");
return false;
}
But it didn't work. what amendments should be done for the code to work? My Application is in D:Final/Main.exe
|