Robin Posted November 14, 2008 Posted November 14, 2008 Here is a small script that i'm trying to do but i have a feeling it's not working...If i use it on a ".BAT" file it even sais its registered...and THAT I know is undoubtfully incorrect...I'm trying to let the customer "search" for a file to be registered ================================================================= #include <File.au3> $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @HomeDrive & "", "All (*.dll;*.ocx)|(*.*)", 1 + 4) $var2 = Runwait("regsvr32.exe",$var) If $var2 = 0 Then MsgBox(0, "Registered", $var , " Successfully Registered...") Else MsgBox(0, "Error", "...No Files") EndIf ================================================================== ...would realy like some help on this please fellas as i have no idea if the file WAS registered or not
jvanegmond Posted November 14, 2008 Posted November 14, 2008 (edited) #include <File.au3> $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @HomeDrive & "", "All (*.dll;*.ocx)|(*.*)", 1 + 4) If @error Then Exit ; User clicked cancel $var2 = Runwait('regsvr32.exe "' & $var & '"') If $var2 = 0 Then MsgBox(0, "Registered", $var , " Successfully Registered...") Else MsgBox(0, "Error", "...No Files") EndIf Edited November 14, 2008 by Manadar github.com/jvanegmond
Robin Posted November 14, 2008 Author Posted November 14, 2008 #include <File.au3> $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @HomeDrive & "", "All (*.dll;*.ocx)|(*.*)", 1 + 4) If @error Then Exit ; User clicked cancel $var2 = Runwait('regsvr32.exe "' & $var & '"') If $var2 = 0 Then MsgBox(0, "Registered", $var , " Successfully Registered...") Else MsgBox(0, "Error", "...No Files") EndIfThx Manadar...i see i made the error with the freakin "&" s..... and (') s....
jvanegmond Posted November 14, 2008 Posted November 14, 2008 Thx Manadar...i see i made the error with the freakin "&" s..... and (') s....You were passing the DLL to add as a "working folder" parameter to Run. A common mistake, other languages sometimes pass arguments to a Run as seperate parameters.. github.com/jvanegmond
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