keilamym Posted December 1, 2004 Posted December 1, 2004 I'm hoping someone can assist me on this one... I'm in the process of replacing a batch file with an autoit .exe file. This line in question is below. for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s basically its supposed to scan a folder for all the .dll files, and then use the regsvr32 command to reregister them all. any suggestions? note: until today, i had no idea that the "for" command even existed as a dos command. Thank You Keilamym
SlimShady Posted December 1, 2004 Posted December 1, 2004 (edited) Dim $Filename $Folder = @SystemDir & "\YourDLLFolder" $search = FileFindFirstFile($Folder & '\*.dll') If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 $filename = FileFindNextFile($search) If @error Then ExitLoop $Filename = $Folder & '\' & $filename If StringRight($Filename, 3) = "dll" Then RunWait('regsvr32 /s "' & $Filename & '"', @SystemDir) WEnd FileClose($search) Edited December 1, 2004 by SlimShady
keilamym Posted December 1, 2004 Author Posted December 1, 2004 wow slim... THANK YOU... i really appreciate the quick response... can i send you a tip or something? Keilamym
SlimShady Posted December 1, 2004 Posted December 1, 2004 wow slim... THANK YOU...i really appreciate the quick response... can i send you a tip or something?Keilamym<{POST_SNAPBACK}> If I would get 10 bucks for every time I helped someone, I would be a rich man. You don't have to give me anything, I like helping people.
keilamym Posted December 2, 2004 Author Posted December 2, 2004 If I would get 10 bucks for every time I helped someone, I would be a rich man. You don't have to give me anything, I like helping people.<{POST_SNAPBACK}>well thanks again...
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