我想运行一个脚本,复制我的文件夹并在我复制的文件夹中启动rundll32。
mkdir "c:\SmartCard_Treiber"
xcopy "%~DP0SmartCard_Treiber\*" "c:\SmartCard_Treiber" /i /s
cmd /c cd "c:\SmartCard_Treiber" & RUNDLL32.EXE AdvPack.dll,LaunchINFSection Gemalto.inf,,0
TIMEOUT /T 30 /NOBREAK
rd "C:\SmartCard_Treiber" /Q /S
答案 0 :(得分:2)
mkdir "c:\SmartCard_Treiber"
xcopy "%~DP0SmartCard_Treiber\*" "c:\SmartCard_Treiber" /i /s
pushd "c:\SmartCard_Treiber"
RUNDLL32.EXE AdvPack.dll,LaunchINFSection Gemalto.inf,,0
TIMEOUT /T 30 /NOBREAK
popd
rd "C:\SmartCard_Treiber" /Q /S
更改为所需目录(pushd
),完成后返回上一个目录(popd
)