Skip to content

Instantly share code, notes, and snippets.

@witwall
Last active September 29, 2015 07:47
Show Gist options
  • Save witwall/2ae21b3aa2fc7878d6e4 to your computer and use it in GitHub Desktop.
Save witwall/2ae21b3aa2fc7878d6e4 to your computer and use it in GitHub Desktop.
:CheckOS
IF EXIST "%windir%\SysWOW64\MCPrintX.dll" (GOTO 64BIT) ELSE (GOTO 32BIT)
:64BIT
echo 64-bit...
set dir="%windir%\SysWOW64"
GOTO END
:32BIT
echo 32-bit...
set dir="%windir%\system32"
GOTO END
:END
xcopy "%~dp0*.inf" %dir%\
cd %dir%\
rundll32.exe advpack.dll,LaunchINFSection ScriptX.inf,DefaultUninstall,1
rundll32.exe advpack.dll,LaunchINFSection SecMgr.inf,DefaultUninstall,1
rundll32.exe advpack.dll,LaunchINFSection pt.inf,DefaultUninstall,1
rundll32.exe advpack.dll,DelNodeRunDLL32 smsx.inf
rundll32.exe advpack.dll,LaunchINFSection PrintX,DefaultUninstall,1
del PrintX.inf
del pt.inf
del ScriptX.inf
del SecMgr.inf
del smsx.inf
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment