|
Answer» Hello all.
I'm writing a batch script that will deploy software on other developers systems and I'm trying to make the install as painless as possible. The install consists of copying files from a repository, registering .dll's, then creating registry entries. What I'd like to KNOW is how can I determine if the following completed successfully, seeing as how I'm RUNNING them in silent mode:
CODE: [Select]ECHO Installing required files... CD DEV01 XCOPY * "C:\Program Files\DEV01\" /E /Y
ECHO Creating registry entries... REGEDIT /S add.reg
ECHO Registering DLL/OCX files REGSVR32 /S "C:\Program Files\DEV01\SomeLibrary.dll" The main one I'm concerned with is REGSVR32 (although it would be nice if there was a generic way to know the results of ANY command), as I need to abort installation (rollback) if there is a problem registering the library. I have about 40 or 50 that I need to register, so I need to determine if any of them fail and which one failed. Thanks in ADVANCE for any help.From what I could find out, REGSVR32 does not issue any return codes and in silent mode does not issue any window messages. Best I can suggest it check for the existence of each file to be registered.
The rollback could get complicated. One possibility would be to keep track of what gets registered (in a file perhaps). The rollback could feed off this file and unregister the files PREVIOUSLY processed.
Good luck. 8-)
|