Jump to content











Photo
- - - - -

Expiry date for Bootable USB/Grub


Best Answer steve6375 , 04 September 2013 - 06:31 PM

That looks fine to me (if you remove the # comment characters).

What version of grub4dos are you using? It should be a 2013 version - you can try the 2013-07-24 045c version or the most recent featured version from here (just overwrite the grldr file on your USB drive).

Go to the full post


  • Please log in to reply
13 replies to this topic

#1 Uvais

Uvais

    Frequent Member

  • Advanced user
  • 180 posts

Posted 03 September 2013 - 03:50 AM

hi EveryOne :)

 

 

I want to know is it possible to make a bootable USB with Expiry date ?

 

Goal : I want to boot from some ISO' & want to set USB' life to 30 Days OR till some specify date .

 

we have used some software's which makes usb like that..hope u got my Q. :) any trick for adding these info in menu.lst .so it can authenticate expiry date etc or  limit USB's boot time ?



#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 7311 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 03 September 2013 - 07:14 AM

http://www.rmprepusb...-an-Expiry-Date


  • Uvais likes this

#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 September 2013 - 10:31 AM

Well, it depends what the actual scope is. (I mean like distributing time-limited proprietary tools, etc.)

It may make some sense in the usage example Steve provided :thumbsup: (reminding the user to update the software/tool) but little else.  :dubbio:

Of course anyone with more than 2 neurons can de-activate that kind of "time bomb".

For the USB without any issue of any kind, for the CD/DVD by re-burning it (or simply changing the BIOS date).

 

:cheers:

Wonko


  • DavidB likes this

#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7311 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 03 September 2013 - 10:42 AM

Using 7Zip to convert the menu.lst to a Gzip file might help to raise the 'hack' threshold to 'someone with more than 3 neurons'?


  • DavidB likes this

#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 September 2013 - 12:06 PM

Using 7Zip to convert the menu.lst to a Gzip file might help to raise the 'hack' threshold to 'someone with more than 3 neurons'?

3.5 will be enough, 3 full functioning ones + 1 in the process of re-growing a synapse.

And changing the BIOS date requirements still remains set at 2+.

 

:cheers:

Wonko



#6 Uvais

Uvais

    Frequent Member

  • Advanced user
  • 180 posts

Posted 04 September 2013 - 12:33 PM

 

Thanks for your Quick Reply Steve...But I am li'l confused :|  ..can you make an Example ? which lines I need to add in  menu.lst & where i need to put "checkdate.g4b" . which Lines of

"checkdate.g4b" I need to modify/Edit 

 

here is mine menu.lst


timeout 10
default 04
gfxmenu /Boot/GFX-BOOT.GFX
title ...::Test Of Time limit ;) ::...\n
root

title \n
root

title Boot From Hard Drive (Windows Vista/7/2008 or Xp)\n
find --set-root --ignore-floppies --ignore-cd /bootmgr || find --set-root --ignore-floppies --ignore-cd /ntldr || rootnoverify (hd0) && chainloader +1 && boot
map () (hd0) && map (hd0) () && map --rehook
find --set-root --devices=h /bootmgr || find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader /bootmgr || chainloader /ntldr

title \n
root

title ===> Microsoft Windows 7 Uv@!S <===
find --set-root /XPE/cmdcons/4dt.iso
map /XPE/cmdcons/4dt.iso (0xff)
map --hook
root (0xff)
chainloader (0xff)

title \n
root

title =====> Ghost <=====
find --set-root /XPE/cmdcons/gt.ISO
map /XPE/cmdcons/gt.ISO (0xff)
map --hook
root (0xff)
chainloader (0xff)

title \n
root


title Reboot
reboot

title Shutdown
halt

title ... Test @ 2013 .
root


#7 steve6375

steve6375

    Platinum Member

  • Developer
  • 7311 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 04 September 2013 - 12:47 PM

The example was

# Usage: /checkdate.g4b <Release Year> <Release Month> <Release DayOfMonth> <ExpiresInDays> [<SILENT>]
/checkdate.g4b 2012 12 3 30
pause
if NOT "%CHECKDATE%"=="OK" reboot
So just put these lines of code where before you load GFXMenu  (otherwise you won't see any messages!).
 
As the command is /checkdate.g4b,  the file checkdate.g4b should be in the root. If you want it somewhere else then path it accordingly - e.g.
/boot/checkdate.g4b 2013 9 4 30
 
for a 30 day expiry starting today.
 
If you are still having problems, try it from the grub4do command line
 
grub> /checkdate.g4b 2013 9 4 30
grub> set CH
 
should return CHECKDAT=OK
 
HTH
Steve

  • Uvais likes this

#8 steve6375

steve6375

    Platinum Member

  • Developer
  • 7311 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 04 September 2013 - 12:52 PM

p.s. grub4dos only has max of 8 characters per variable name, so %CHECKDATE%  == %CHECKDAT%



#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 04 September 2013 - 02:43 PM

With all due respect to the good Steve6375, his batch is a rather complex form of mathematical calculation with dates, elapsed days and what not, and while really nice :worship:, if the concept is that of "limiting" the use to a given date (calculated separately) something much more simpler can be IMHO used, even directly in a menu.lst example:



title testhalt
if 20140101>=%@date:~0,4%%@date:~5,2%%@date:~8,2% echo halt
pause

that may ultimately become a one-liner:



if 20140101>=%@date:~0,4%%@date:~5,2%%@date:~8,2%  halt

:cheers:

Wonko



#10 Uvais

Uvais

    Frequent Member

  • Advanced user
  • 180 posts

Posted 04 September 2013 - 05:39 PM

 

The example was

# Usage: /checkdate.g4b <Release Year> <Release Month> <Release DayOfMonth> <ExpiresInDays> [<SILENT>]
/checkdate.g4b 2012 12 3 30
pause
if NOT "%CHECKDATE%"=="OK" reboot
So just put these lines of code where before you load GFXMenu  (otherwise you won't see any messages!).
 
As the command is /checkdate.g4b,  the file checkdate.g4b should be in the root. If you want it somewhere else then path it accordingly - e.g.
/boot/checkdate.g4b 2013 9 4 30
 
for a 30 day expiry starting today.
 
If you are still having problems, try it from the grub4do command line
 
grub> /checkdate.g4b 2013 9 4 30
grub> set CH
 
should return CHECKDAT=OK
 
HTH
Steve

 

 

 

Hey do i need to Modify "checkdate.g4b" ?

 

 

Please Modify this menu.lst

 

http://db.tt/uXeoQMkQ


Edited by Uvais, 04 September 2013 - 05:59 PM.


#11 steve6375

steve6375

    Platinum Member

  • Developer
  • 7311 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 04 September 2013 - 05:55 PM

Hey do i need to Modify "checkdate.g4b" ?

 Not sure what you mean?

If you want to use checkdate then it doesn't need modifiying.

If you want to use Wonko's  one line check then use that instead of checkdate.g4b.


  • Uvais likes this

#12 Uvais

Uvais

    Frequent Member

  • Advanced user
  • 180 posts

Posted 04 September 2013 - 06:05 PM

i think I am making mistakes in adding commands in menu.lst 

 

Please Modify this menu.lst

 

http://db.tt/uXeoQMkQ



#13 steve6375

steve6375

    Platinum Member

  • Developer
  • 7311 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 04 September 2013 - 06:31 PM   Best Answer

That looks fine to me (if you remove the # comment characters).

What version of grub4dos are you using? It should be a 2013 version - you can try the 2013-07-24 045c version or the most recent featured version from here (just overwrite the grldr file on your USB drive).



#14 Uvais

Uvais

    Frequent Member

  • Advanced user
  • 180 posts

Posted 05 September 2013 - 09:59 AM

That looks fine to me (if you remove the # comment characters).

What version of grub4dos are you using? It should be a 2013 version - you can try the 2013-07-24 045c version or the most recent featured version from here (just overwrite the grldr file on your USB drive).

ohh yeah i was using "Make_USB" but after using ur tool its working :)

Attached Thumbnails

  • Capture.JPG





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users