Jump to content

Error -->RunWait with Regsvr32.exe and &var


Robin
 Share

Recommended Posts

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

:mellow:

=================================================================

#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 :(

Link to comment
Share on other sites

#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 by Manadar
Link to comment
Share on other sites

#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
Thx Manadar...i see i made the error with the freakin "&" s..... and (') s....
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...