Volser Posted March 29, 2006 Share Posted March 29, 2006 (edited) Hello people,I'm having a problem with an vb script:The problem is that i'm trying to register acx and dll files in the registry. This works good as far as I know. The real problem is that I want it to make a backup of the registry. I't needs to tell me with file made a change in the registry and with file did not do that. This is my CodeSet WshShell = WScript.CreateObject("WScript.Shell") RunFolder = InputBox("Please specify full Corsa installation folder. (Example: C:\inifile)")Filelist = Inputbox("Please specify text file name and destination dir. (Example: C:\textfile.txt)")strFolder = RunFolder Set Fso = CreateObject("Scripting.FileSystemObject") Set objFolder = Fso.GetFolder(strFolder) Set colFiles = objFolder.Files Set TextFile = Fso.CreateTextFile(Filelist) For Each objFile In colFiles TextFile.WriteLine objFile.Path Next ShowSubFolders(objFolder) Sub ShowSubFolders(objFolder) Set colFolders = objFolder.SubFolders For Each objSubFolder In colFolders TextFile.WriteLine objSubFolder.Path Set colFiles = objSubFolder.Files For Each objFile In colFiles TextFile.WriteLine objFile.Path Next ShowSubFolders(objSubFolder) Next End SubTextFile.CloseMsgBox "Text File Made"Const ForReading = 1Set objFSO = CreateObject("Scripting.FileSystemObject")Set objFile = objFSO.OpenTextFile(Filelist, ForReading)Set objShell = WScript.CreateObject("WScript.Shell") objShell.Run("c:\art\Art.exe /s c:\art\ART_DB.rgf -a -b -f:exclude")Do Until objFile.AtEndOfLine strLine = objFile.ReadLine i = 1 Extension = Right(strLine,i) Do While (not (Left(Extension, 1) = ".")) and (i <= 5) Extension = Right(strLine, i) i = i + 1 loop Extension = UCase(Extension) if (Extension = ".OCX") or (Extension = ".DLL") then i = 1 FileName = Right(strLine, i) do while (not (left(strLine, 1) = "\")) FileName = Right(strLine, i) i = i + 1 loop FileName = Right(strLine, i - 1) FileName = Left(strLine, i - 5) objShell.Run("regsvr32.exe /s " & strLine), 1, True objShell.Run("c:\art\Art.exe /s c:\art\ART_DB.rgf -a -b -f:exclude") objShell.Run("c:\art\art.exe /c c:\art\ART_DB.rgf -fr:c:\art\"& FileName &".reg"), 1, True end ifLoopobjFile.CloseMsgBox "OCX and DLL Files Are Registered In The Registry. Registry Back-ups Are Placed In C:\ari"ARI stands for Advanced Registry Tracer. This program makes teh backup of the register!!I hope any one can help me.Many Thanks Edited March 29, 2006 by Volser Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now