Jump to content

Recommended Posts

  • Replies 104
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Moderators
Posted

Not sure what has happened, but after installing the latest beta I now get this error when running the script.

C:\Program Files\AutoIt3\beta\Include\GuiStatusBar.au3 (98) : ==> Can not redeclare a parameter inside a user function.: 
Local $a_PanelWidth[1] = [$temp_width] 
Local ^ ERROR
  • Moderators
Posted (edited)

That's an error that you get if you have

Func Something($a_PanelWidth)
Local $a_PanelWidth[1] = [$temp_width]; Redeclaring the parameter with local
, but I have .106 not .107 and couldn't find an issue with it there, my suggestion would be to look at the StatsBar.au3 udf(s) themselves and remove the local if it is a parameter in the function.

Edit:

Forgot to close the code bracket

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted (edited)

it will be changed to correct this behavior

Func _GuiCtrlStatusBarCreate($h_Gui, $a_PanelWidth, $s_PanelText, $v_styles = "")
    Local $a_PW[1], $a_PT[1]
    If Not IsArray($a_PanelWidth) Then
        $a_PW[0] = $a_PanelWidth
    Else
        $a_PW = $a_PanelWidth
    EndIf
    If Not IsArray($a_PT) Then
        $a_PT[0] = $s_PanelText
    Else
        $a_PT = $s_PanelText
    EndIf
    If Not IsHWnd($h_Gui) Then $h_Gui = HWnd($h_Gui)
    Local $hwnd_Bar1, $x
    Local $style = BitOR($WS_CHILD, $WS_VISIBLE)
    If @NumParams = 4 Then $style = BitOR($style, $v_styles)
    $hwnd_Bar1 = DllCall("comctl32.dll", "long", "CreateStatusWindow", "long", $style, "str", "", "hwnd", $h_Gui, "int", 0)
    
    If Not @error Then
        _GuiCtrlStatusBarSetParts($hwnd_Bar1[0], UBound($a_PW), $a_PW)
        For $x = 0 To UBound($s_PanelText) - 1
            _GuiCtrlStatusBarSetText($hwnd_Bar1[0], $a_PT[$x], $x)
        Next
        
        Return $hwnd_Bar1[0]
    EndIf
    SetError(1)
    Return 0
EndFunc  ;==>_GuiCtrlStatusBarCreate
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

  • 3 weeks later...
  • 1 month later...
Posted

Made some minor changes to the script. See first post for details.

Why do I get the errors "error reading file " GuiStatusBar.au3, and samething for the

#include <GuiListView.au3> .

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

  • Moderators
Posted

Why do I get the errors "error reading file " GuiStatusBar.au3, and samething for the

#include <GuiListView.au3> .

Make sure you have the latest beta version installed. After you have that installed you will need to toggle the beta defs.

Start-->All Programs-->AutoIt v3-->beta-->Toggle AU3 Beta

Posted

Make sure you have the latest beta version installed. After you have that installed you will need to toggle the beta defs.

Start-->All Programs-->AutoIt v3-->beta-->Toggle AU3 Beta

That was it, Man this is cool!

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Posted

Hi

I really like this app and could use it, but i would need to add the option of account username and password as well as remote pc.

Does anyone fancy doing this - i would but i'm still a newbie :think:

Thanks

  • Moderators
Posted (edited)

Hi

I really like this app and could use it, but i would need to add the option of account username and password as well as remote pc.

Does anyone fancy doing this - i would but i'm still a newbie :think:

Thanks

That shouldn't be a problem for running the uninstall path, but to read the reg keys I believe you would have to do a runas on the script itself. I'll see what I can do.

Edit: After some testing the whole script seems to function just fine if you do a runas.

Edited by big_daddy
  • 1 month later...
Posted

Hi BigDaddy,

Excellent script and functionality...Although I noticed the silent mode only works with MSI installed packages...I tried uninstalling Apple Itunes software in silent mode. It still prompted me to modify or remove program...

Is there any solution for that...??

Cheers,

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
  • Moderators
Posted

Hi BigDaddy,

Excellent script and functionality...Although I noticed the silent mode only works with MSI installed packages...I tried uninstalling Apple Itunes software in silent mode. It still prompted me to modify or remove program...

Is there any solution for that...??

Cheers,

Thanks, the silent uninstall also works for programs that set a "QuietUninstallString" reg value. However not all MSI packages support the silent uninstall swithes. That is likely what is causing you problems.
Posted

Cool, Is there anyway to uninstall such packages(those that do not have "QuietUninstallString") in a silent fashion..by modifying reg values or does one have to automate the uninstall...

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
  • Moderators
Posted

Cool, Is there anyway to uninstall such packages(those that do not have "QuietUninstallString") in a silent fashion..by modifying reg values or does one have to automate the uninstall...

If an MSI package doesn't support silent switches, and the developer didn't provide a "QuietUninstallString", then automating it is the only way I can think to do it.
Posted

This is a bit off topic, but I'm trying to use this to audit computers on my company's network since our utility only works if they are a part of our domain, which most of them arent. I am able to use this script on some computers, but I am not able to see all the files installed. The ones I cant see are the ones that I am trying to find, the windows updates. I modified the script slightly so that when it uses the beyondexec function, it uses our default administrator password. Any ideas of why I'm not able to see the Windows Security updates? This is the only way I've modified the file. The ********* is obviously where I have the real password.

$Pid = Run('BeyondExec.exe ' & StringMid($RemoteComputer, 1, StringInStr($RemoteComputer, '\', 0, -1) - 1) & ' -u administrator -p ********** -s -n -r ' & $SelectKey, @WorkingDir, @SW_HIDE)

Have I put the switches in the wrong spot? Forgive me if I'm not too much help in explaining this, I'm actually a network guy just trying to pick up on a bit of scripting.

I am also trying to filter it to only show the entries with the key name KB****** for example KB899591. I'm assuming I need to put that if statement in the ReadKeys function? If so how would I make it only display with that name? I'm not even sure how to use a wildcard character, can I put it in single quotes like

If $line == 'KB??????'

Any help is appreciated.

Thanks!

Posted

You could try StringRegExp() [beta Version] to check for specific strings..

It is interesting that the script does not display MS KB and other entries when run on a remote pc.

Cheers,

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
Posted

To get started an example ; this code does not work and need improvisation...

#include<string.au3>

For $i_loop= 1 to 100

$MS_KB_Reg_Value = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\", $i_loop)

If @error <> 0 then ExitLoop

$MS_KB_Reg_Value_Temp = StringRegExp($MS_KB_Reg_Value,"KB\d")

For $j_loop = 1 To 100

$MS_KB_Reg_Value1 = _StringInsert("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\", $MS_KB_Reg_Value_Temp,$j_loop)

MsgBox(0,"",$MS_KB_Reg_Value1)

Next

Next

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
Posted

Code provided by Mhz....

$Key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"

For $i_loop = 1 To 1000

$MS_KB_Reg_Value = RegEnumKey($Key, $i_loop)

If @error Then ExitLoop

If StringRegExp($MS_KB_Reg_Value,"\<KB\A+") Then

SplashTextOn("Value3 ",$Key & $MS_KB_Reg_Value,700,75)

Sleep(200)

SplashOff()

EndIf

Next

[font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font]
  • 1 year later...

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
  • Recently Browsing   0 members

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