@echo off
:: (c) 2015 joe.petach@siemens.com
::
:: This script will add two commands to the Windows Explorer context menu for NX .prt files.
:: NX Version and NX Assy Info
::
setlocal ENABLEDELAYEDEXPANSION
echo;
echo Adding command NX Assy Info
echo;
reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX Assy Info\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ugpc.exe\" -s -a \"%%1\" ^& pause \" " /f
echo;
echo Adding command NX Version
echo;
reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX Part Version\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ug_inspect.exe\" -release \"%%1\" ^& pause \" " /f
echo;
echo Adding command NX Convert Units
echo;
reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX Convert to mm\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ug_convert_part.exe\" -mm \"%%1\" ^& pause \" " /f
echo;
echo Adding command NX Convert Units
echo;
reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX Convert to Inches\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ug_convert_part.exe\" -in \"%%1\" ^& pause \" " /f
echo;
echo NX commands added to the context menu for .prt file.
echo.
:EOF