BatchPatch Forums Home › Forums › BatchPatch Support Forum › regsvr32 /s twext.dll and regsvr32 /u /s twext.dll giving Exit Code: 4
- This topic has 6 replies, 2 voices, and was last updated 8 years, 1 month ago by mortega.
-
AuthorPosts
-
November 7, 2016 at 9:01 pm #9284mortegaParticipant
regsvr32 /s twext.dll and regsvr32 /u /s twext.dll giving Exit Code: 4 on Execute Remote Command. Please advise.
November 7, 2016 at 9:37 pm #11426dougModeratorBatchPatch returns the error that was reported by regsvr32 on the target machine, so I don’t think this is a BP error, but rather it’s an error from regsvr32. Googling reveals that the exit 4 is probably indicating an issue with locating the dll in question. Perhaps try the full path instead of just the .dll name?
https://stackoverflow.com/questions/22094309/regsvr32-exit-codes-documentation
-Doug
November 7, 2016 at 10:28 pm #11427mortegaParticipantWow… Thank you so much for the quick response and the suggestion. I did some research and ran a test and it turns out that it was failing because it didn’t have the proper registry entry. I found these two settings and created two batch files.
Shadow Copies Disable.bat
regsvr32 /u /s twext.dll
if errorlevel 1 REG ADD HKLMSoftwareMicrosoftWindowsCurrentVersionExplorer /V NoPreviousVersionsPage /T REG_DWORD /D 1
Shadow Copies Enable.bat
regsvr32 /s twext.dll
if errorlevel 1 REG ADD HKLMSoftwareMicrosoftWindowsCurrentVersionExplorer /V NoPreviousVersionsPage /T REG_DWORD /D 0
—
The first time I execute the batch file using Deploy Software batch/script/regkey/etc it worked great but when I run the opposing batch file it shows “Deployment: Executing” and the the path to the copied bat file on the target machine.
I tested the batch file and the first time I ran it on my system it worked as expected but the second time it prompted me for a response. How can I force it to say ‘Yes’? Thanks again for the quick response Doug!
C:UsersmxoDesktop>regsvr32 /u /s twext.dll
C:UsersxxxxxDesktop>if errorlevel 1 REG ADD HKLMSoftwareMicrosoftWindowsCur
rentVersionExplorer /V NoPreviousVersionsPage /T REG_DWORD /D 1
Value NoPreviousVersionsPage exists, overwrite(Yes/No)?
November 7, 2016 at 10:37 pm #11428mortegaParticipantForgot to add, that after I manually type in Yes and press Enter, each of the batch files work as expected. I was hoping to get some assistance as to how to automate that response into the is process somehow? Thank you!
November 8, 2016 at 12:17 am #11430dougModeratorMaybe try /f which according to the link below “Adds the registry entry without prompting for confirmation.”
https://technet.microsoft.com/en-us/library/cc742162(v=ws.11).aspx
-Doug
November 10, 2016 at 5:32 am #11436mortegaParticipantThanks for the info, I’ll give that a shot
November 10, 2016 at 1:58 pm #11440mortegaParticipantAdding the /f at the end of the script worked great! Thank you Doug!
Shadow Copies Disable.bat
regsvr32 /u /s twext.dll
if errorlevel 1 REG ADD HKLMSoftwareMicrosoftWindowsCurrentVersionExplorer /V NoPreviousVersionsPage /T REG_DWORD /D 1 /f
Shadow Copies Enable.bat
regsvr32 /s twext.dll
if errorlevel 1 REG ADD HKLMSoftwareMicrosoftWindowsCurrentVersionExplorer /V NoPreviousVersionsPage /T REG_DWORD /D 0 /f
-
AuthorPosts
- You must be logged in to reply to this topic.