LZ, take a look. This is a BAT I got from my colleague who is developing products for the company. But we're using PROE Wildfire Edition 2.0. I don't know if it's useful for your 3.0!
@echo off
cls
title Purge Subs
if !%1==! goto nopath
if not exist %1*.* goto badpath
:start
title Purge Subs from %1
call :subpurge %1
FOR /D /R %%a IN (*.*) do call :subpurge "%%a"
goto complete
:subpurge
echo Purging, %1
cd "%1"
call purge.bat
goto :EOF
:nopath
echo.
echo ERROR - No path provided....
echo.
echo You must provide a path when calling %0
goto complete
:badpath
echo.
echo ERROR - "%1" is not a valid path....
echo.
echo You must provide a valid path when calling %0
goto complete
:complete
echo.
pause
exit
The following is the content of the PurgeProSubs.INF file:
;
; Purge Pro/E Subs from Explorer
;
signature="$CHICAGO$"
CopyFiles = PurgeProSubs.Files.Inf
AddReg = PurgeProSubs.Reg
CopyFiles = PurgeProSubs.Files.Inf
AddReg = PurgeProSubs.Reg
CopyFiles = PurgeProSubs.Files.Inf
AddReg = PurgeProSubs.Reg.NT
DelFiles = PurgeProSubs.Files.Inf
DelReg = PurgeProSubs.Reg
DelFiles = PurgeProSubs.Files.Inf
DelReg = PurgeProSubs.Reg.NT
55="Purge Pro/E Files","",1
PurgeProSubs.INF=55
PurgeProSubs.Files.Inf = 17
PurgeProSubs.INF
; This section is for Win95 (untested on Win95)
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%PurgeProSubsName%"
HKLM,%UDHERE%,UninstallString,,"%10%\rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%\PurgeProSubs.inf"
HKCR,Directory\Shell\PurgeProSubs,,,"%PurgeProSubsAccel%"
;-----------------This is the line that calls the purge.bat file-----\
HKCR,Directory\Shell\PurgeProSubs\command,,,"%10%\command.exe /c purgesubs.bat ""%1""
; This section is for WinNT 4.0
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%PurgeProSubsName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\PurgeProSubs.inf"
HKCR,Directory\Shell\PurgeProSubs,,,"%PurgeProSubsAccel%"
;-----------------This is the line that calls the purge.bat file-----\
HKCR,Directory\Shell\PurgeProSubs\command,,,"%11%\cmd.exe /c purgesubs.bat ""%1""
; This is the name which shows up in the "Add/Remove Programs" list
PurgeProSubsName="Pro/E Purge Subs command (Remove Only)"
; This is the menu entry that shows up when you right click on a folder in explorer
; The "&" caues the next character to be (underlined) hot key
PurgeProSubsAccel="Pro/E Purge &Subs"
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\PurgeProSubs"
Copy it to your computer, save it as PurgeProSubs.INF, then right-click on that file and select Install. Then save the above batch code as PurgeSubs.bat, and copy it to the BIN subdirectory under the PROE installation directory. Then go back to the directory above proe2001, right-click on proe2001, and there will be an extra "pro/E Purge Subs" option in the right-click menu!
[
Last edited by ieutk on 2007-6-19 at 10:38 PM ]