April 18, 2024, 05:35:52 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Detecting if a exe file is run whilst zipped

Started by Andy, March 25, 2015, 02:04:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

Hi,

Don't know if this is any use to anyone, but I've found a way to detect if my .exe file has been unzipped  when someone runs it.

It's very simple, just add these lines to the start of your code:

IF INSTR(GETSTARTPATH,"\\Temp\\")
   MESSAGEBOX(0,"Sorry, You need to Extract / Unzip the Setup.exe program first.","Error",@MB_ICONINFORMATION | @MB_OK)
   END
ENDIF

Basically, if it's not been unzipped, Windows (or other porgrams) will run it in a 'Temp' folder.

For my setup.exe, I need users to unzip it first before running.

I've tested this on XP and Win7.

Perhaps someone might test this on Vista and Win8?

Anyway if it helps, please use it.

Andy
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.