View Single Post
  #1 (permalink)  
Old 06-26-2009, 12:52 PM
mynah mynah is offline
Junior Member
 
Join Date: Jun 2009
Posts: 7
Question 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
Reply With Quote