AlienStar Posted September 12, 2009 Share Posted September 12, 2009 (edited) hello everybody we know all that there are some of games we can't run on hard desk only on cd/dvd rom so in this situation we have to use virtual drive now how can I let every script I make run just in cd/dvd rom ( can't run on hard desk if it was copied ) ??? thanks for all Edited September 12, 2009 by AlienStar Link to comment Share on other sites More sharing options...
Skruge Posted September 12, 2009 Share Posted September 12, 2009 DriveGetType [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
Hawkwing Posted September 12, 2009 Share Posted September 12, 2009 (edited) Add this to the front of your script. If DriveGetType(StringTrimRight(@ScriptDir, StringLen(@ScriptDir) - 2)) <> "CDROM" Then Exit btw, DriveGetType returns "CDROM" for CDs and DVDs, and maybe Blu-ray too, but I don't have a Blu-ray drive to test it on. Edited September 12, 2009 by Hawkwing The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
AlienStar Posted September 12, 2009 Author Share Posted September 12, 2009 (edited) I know if the script I'm making has links I can use this $var = DriveGetType($Drive&"\") = "CDROM" something like this : script to eject the drive which contain the script : $drive = StringLeft(@ScriptFullPath,2) If DriveGetType($Drive&"\") = "CDROM" Then CDTray($Drive,"Open") but if there are no links in how to make it ? like this : If ProcessExists("project.exe") = True Then MsgBox(64, 'Info', 'existed') Else MsgBox(64, 'Info', 'not existed') EndIfn ???????????!!!!!!!!!!!!! Edited September 12, 2009 by AlienStar Link to comment Share on other sites More sharing options...
AlienStar Posted September 12, 2009 Author Share Posted September 12, 2009 thanks Hawkwing it works waw thanks again so much and Skruge too Link to comment Share on other sites More sharing options...
smashly Posted September 12, 2009 Share Posted September 12, 2009 Hi, There is multiple things you could use to have the script to check itself when it's started. DriveGetType() DriveGetFileSystem() FileGetAttrib() Nothing will really stop a determined enough person from defying where the script is run from. But it'll hold the novice user at bay. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now