问题标签 [usb-flash-drive]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
31641 浏览

windows - 插入 USB 时自动打开文件

几天来我一直在寻找这个问题的答案,但我仍然没有找到任何关于它的东西。

我正在尝试在插入 USB 闪存驱动器时执行 .exe 文件 - 不征求用户许可,我的意思是一旦插入 USB,上面的程序(例如:F:\run. exe) 正在启动,用户没有任何点击。

我在 autorun.inf 文件中使用 shell 执行了这段代码:

并且防病毒软件将此文件检测为 gen 蠕虫,但我仍然无法运行 exe 文件。

谢谢你!

0 投票
1 回答
7109 浏览

android - 如何找到安装到android的USB路径?

我正在开发一个从 USB 读取数据的 android 应用程序。USB可以通过串口连接到android,我的应用程序可以找到它。

现在,我想从 USB 读取数据文件和文件夹。我读过很多文章。我发现他们使用以下代码:

但是在我的情况下,我知道路径是/storage/emulated/0。当我尝试读取路径中包含的所有文件时,我得到以下语句:

等等。

但是找不到我的usb的路径。所以,我不确定这是从 USB 读取文件的正确方法吗?

这是我的代码:

0 投票
1 回答
706 浏览

c# - USB 记忆棒上的 Windows 客户端应用程序,具有写保护功能

我需要一种或多种方法来实现以下场景:

假设我们有一个 Windows 应用程序(日记),其中日记条目被序列化为 XML。

该应用程序位于 USB 记忆棒和 XML 文件上。

主要问题是:除了应用程序本身之外,没有人应该能够写入/删除 USB 记忆棒。

我读过关于带有机械或软件写锁的 USB 记忆棒。但这也会禁止应用程序写入?!

我对任何方法都很满意。

ps 这将是一个 .NET 3.5 WPF 应用程序。但我认为这并不重要。

先感谢您

0 投票
2 回答
233 浏览

vbscript - 更改驱动器号

我在弄清楚如何将根目录与闪存驱动器程序一起使用时遇到了一些麻烦。例如:我正在尝试运行“E://Program/data/install.vbs”,但驱动程序号不断变化。任何帮助将不胜感激,谢谢。

我认为我正在寻找的批处理版本是 %root%\Program\data\install.bat 但我仍然需要它的 vbscript 形式。

0 投票
1 回答
144 浏览

autorun - 想要创建一个自动运行的闪存驱动器

我想创建一个闪存驱动器,它在插入笔记本电脑/PC 时会打开一个 exe 文件。我不想制作 Autorun.inf 文件。那些在插入时不会执行程序,但让您可以选择打开它。我希望它无法从 avast 中检测到。

对于我的公司,我需要在一些计算机上安装一个新程序,我只想在每台计算机上插入一个闪存驱动器并安装我的新程序。

要使用的操作系统:7 和 xp 每个驱动器上的最小空间:2gig 防病毒软件:Avast

0 投票
1 回答
2185 浏览

python - 如何将记忆棒上的文件读入python脚本?

我在记忆棒上有一个文件,我想在我的 python 脚本中使用它。最简单的方法是将文件移动到它当前查找的目录中,但出于安全原因,我不能这样做。我如何写入文件位置,以便成功找到记忆棒上的文件并将其读入?这是我试过的......

0 投票
2 回答
8429 浏览

python - Python off a Flash Drive, how to start IDLE?

I was trying to run Python 3.3 off of my flash drive. I already tried Portable Python, but most of what it had wouldn't open, and it crashed my laptop.

So, I deleted it, and installed regular Python. Then, I wanted to start adding my favorite modules. And, I needed a way to start IDLE without the original shortcut.

To install modules, I added my Python install to my PATH variable.

To make all this easier, I made a batch file, using some code I found on this question.

So far, I have this. It also asks for the drive letter, because that changes from computer to computer.

It outputs this: IDLE Bringer Output

If you go on and follow the instructions and type what it says, it brings up IDLE. I couldn't figure out how to get the batch file to actually type into the Python prompt, so I told it to tell the user to type what needed to be typed.

What I need to know is, how can I change the PATH variable from within the batch file. Also, how to I remove it when I'm done (this isn't as important, and could even be in a separate batch file).

Or, alternatively, is there a way just to shortcut to IDLE?

Also, is there a way to run .py files without the command line, with the Python install on my flash drive?

Thanks!

0 投票
1 回答
4809 浏览

usb - 有没有办法将外部硬盘驱动器安装为 USB 闪存驱动器?

为了避免为备份软件的额外功能付费,我需要将我的外部硬盘驱动器安装为 USB 闪存驱动器。Windows 自动将外部硬盘驱动器识别为“我的电脑”上的“硬盘驱动器”。但是,闪存驱动器被识别为“具有可移动存储的设备”。我需要将我的 3TB 硬盘驱动器安装为“具有可移动存储的设备”。

我正在使用 Windows 7 专业版。任何帮助将不胜感激。

0 投票
1 回答
54 浏览

command-line - USB 驱动器安装以访问和发送信息到

试图打开我的 USB 驱动器并运行这个程序,该程序有一堆命令要运行,但每次我在 CMD 中运行它时,它都会说文件名、目录名或卷标语法不正确。我不明白为什么我不断收到此错误?

0 投票
2 回答
2350 浏览

linux - 如何区分USB硬盘驱动器和USB闪存驱动器?

在 Windows 中,您可以通过 GetDriveType 返回值来确定 USB 硬盘驱动器或 USB 闪存驱动器。

DRIVE_REMOVABLE ==> USB 闪存驱动器

DRIVE_FIXED ==> USB 硬盘驱动器

我应该如何在linux中做到这一点?

从开发人员的角度来看,我应该怎么做?