I would like to run a script, copy my folder and start rundll32 in my copied folder.
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
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
Change to the needed directory (pushd
) and when finished return to the previous one (popd
)