NoC*_*sis 6 script portable autorun truecrypt
我希望我的 TrueCrypt 虚拟驱动器通过在分区的 autorun.inf 文件中执行命令来充当新插入的 USB 驱动器或 CD/DVD。
我在网上阅读了一些建议,包括创建 .bat 文件或安装软件,以便 Windows 会认为这是一张 CD,但我想知道最简单和最少侵入性的方法来实现它。即我想尽可能避免安装或弄乱主机,因为它旨在成为一个完全便携的驱动器。
编辑:澄清一下,从技术上讲,我的闪存驱动器上有两个单独的 autorun.inf 文件:USB 驱动器的基目录中有一个文件,它在我插入驱动器后立即正确提示我运行 TrueCrypt,还有一个加密容器内的 autorun.inf。
第二个 autorun.inf 文件位于 TrueCrypt 挂载后创建的虚拟驱动器的基目录中(实际上,这个 inf 文件是由 LiberKey 创建的,这是我在容器内使用的便携式 UI)。我希望能够在安装虚拟驱动器后立即自动运行第二个 inf 文件。
小智 5
我知道这个问题很老,但它在搜索列表中很高,所以我虽然我会发布我的解决方案。
我挂载磁盘并使用 .bat 文件启动我的程序。我在“登录时”计划任务中启动 .bat 文件。
这是我的蝙蝠。享受。
请注意,您应该将 truecrypt 设置为不自动安装您的“收藏夹”,并且存在以下 bat 无法处理的情况:当卷安装到指定的备用驱动器号时。
REM - Truecrypt mount and launch file - 2013
REM - Set variables as needed below
@ECHO OFF
SET tcexec="%PROGRAMFILES%\truecrypt\truecrypt.exe"
SET mountdrive=x
SET volumefolder="%USERPROFILE%\truecrypt"
SET volumename=TrueCrypt-Volume
IF EXIST %mountdrive%: goto DriveExists
IF NOT EXIST %volumefolder%\%volumename% goto NoVolume
IF NOT EXIST %tcexec% goto noTC
REM Mount volume
cd %volumefolder%
%tcexec% /v %volumename% /l%mountdrive% /a /q
echo %ERRORLEVEL%
if ERRORLEVEL 1 GOTO mountfail
if ERRORLEVEL 0 GOTO startprograms
:startprograms
REM ******************************
REM ** Start your programs here **
REM ******************************
REM start "" "C:\Users\<userid>\AppData\Roaming\AeroFSExec\aerofs.exe"
REM start "" "C:\Program Files\ownCloud\owncloud.exe"
REM ********************************
REM ** END of Program Start block **
REM ********************************
goto end
:mountfail
echo Truecrypt failed to mount volume.
goto end
:noTC
echo Cant find truecrypt at: %tcexec%
goto end
:NoVolume
echo Identified volume does not exist: %volumefolder%\%volumename%
goto end
:DriveExists
echo Drive letter %mountdrive% already exists, cannot mount truecrypt volume
goto end
:End
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11632 次 |
| 最近记录: |