Advertisement
Bear67

Copy2Ram

Jan 6th, 2022
1,148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.06 KB | None | 0 0
  1.  
  2. @rem ----- ExeScript Options Begin -----
  3. @rem ScriptType: console
  4. @rem DestDirectory: temp
  5. @rem Icon: default
  6. @rem ----- ExeScript Options End -----
  7. @echo off
  8. IF Exist X: (Set Log=X:\Copy2Ram.log) Else (Set Log=NUL:)
  9.  
  10. IF Exist C:\Program?Files\TrueCrypt\TrueCrypt.exe (Goto _Local) Else (Goto _Portable)
  11.  
  12. :_Local
  13. IF Exist X: (Echo Found TrueCrypt on Drive C >>%Log%)
  14. C:
  15. cd\
  16. cd %ProgramFiles%\TrueCrypt
  17. rem TrueCrypt.exe %1 /l t /e /k %Ram%\%KeyFile% /q /s /m rm
  18. goto _End
  19.  
  20. :_PortErr
  21. Echo ERROR!! TrueCrypt not Found on Drive C or on Portable Drive.. HALTING!!!! >>%Log%
  22. goto _End2
  23.  
  24. :_Portable
  25. IF Exist X: (Echo Did NOT find TrueCrypt on Drive C, Loading it from Drive %SRC% >>%Log%)
  26. IF NOT Exist %SRC%\TrueCrypt\TrueCrypt.exe (goto _PortErr)
  27. %SRC%
  28. cd\
  29. cd TrueCrypt
  30.  
  31. :_End
  32. Copy TrueCrypt.exe %ram% >>%Log%
  33. Copy *.sys %ram% >>%Log%
  34. IF Defined TC (C:) else (%Ram%)
  35. cd\
  36. IF Defined TC (cd %Ram%)
  37. TrueCrypt.exe %1 /l t /e /k %KeyFile% /q /s /m rm
  38.  
  39. :_End2
  40. IF Exist X: (Echo Deleting Files from the Temp Directory >>%Log%)
  41. CleanEdit.bat 2
  42.  
  43. :_EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement