Sign in to follow this  
Followers 0
kjactive

Au3Update facelift

28 posts in this topic

#1 ·  Posted (edited)

I discovered that my update manager was out of date and I made a runover, fixed some

problems, included a new option as to make updates to all Url files, a special Url update

editer got included...

:Posted Image

"Au3Update" can work as a SciTe macro application (ie, used with SciTe Script Editor)

and an include example is provided in the topics under 'special notes' but the application

do not need any modification or arguments and can just as well work as a standalone

and make updates to all kind of programs outside the autoit3 area just as well as the

native autoit system.

The application is origin based on idears from Rob Saunders but totally rewritten and

has extended powers as to build up a library of updates, as to use both install scripts

as to update from zip archive files and to make ReInstall directly from this library list...

No limits in special update entries attached, two examples included: Koda and SciTe...

Source code, install/uninstaller and a topics is included...

Download from site:

http://www.sitecenter.dk/latenight/nss-fol...e/Au3Update.exe

kjactive :P

Edited by kjactive

Share this post


Link to post
Share on other sites



Im loving what you made. Im getting some errors though. Like I go to the mainmenu and then I click off and gives me some tmp[1] split error. I have no idea what that is.


Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

No I can imagine - does the autoit runtime provide an error line number or provide a little more cloe to where to look as what did I do, I went to the main menu and did?, as one can't 'go to the main menu and then I click off' - anyway I think...

Nice with an responce though...

kjactive

Edited by kjactive

Share this post


Link to post
Share on other sites

Sorry found another what I did wrong. Wait for the green progress bar to finish loading then click on the project menu. After that just click off the menu and it gives you that error.


Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Well the little buggy is removed and another option got attached to the about window...

AutoIt3 system inspector / revision snooper ( if revisions is available )

Bye the way the system native 'AutoUpdateIt' application is currently non function and provide an error...

download from site:

http://www.sitecenter.dk/latenight/nss-fol...e/Au3Update.exe

kjactive :P

Edited by kjactive

Share this post


Link to post
Share on other sites

The update is great! I love the ability to download and unzip - I think, except it's still not working.

There's a problem in the last version (which I think I wrote to you about) that's still present with both the AtutoIt installation routine and the Unzip routine. If I attempt to download and run an AtuoIt beta update, it downloads to the library fine, but when it attempts to run, I get the error message:

Windows cannot find 'C:\Program'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search.

It looks like the RUN line in your code needs to put double quotes around the command line. You're probably doing something like:

Run ( $InstProg )

and it needs to be

Run ( '"' & $InstProg & '"' )
to be able to interpret the space between Program and Files. Same thing with unzipping - it's not doing anything probably because there's a space in the command line.

It would also be helpful if it displayed the currently installed Beta version (available in the AutoIt reg key).

None the less, it's a nice little program.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Well I tryed to change the updater to use a zip component - XStandard.Zip and got almost the totally autoit3 system removed in three seconds ( don't use this component ) and therefore I still use an external program 'Unzip.exe' that should durring the installation process get copied to the current windows revision system drawer, in most cases called system32 - please check path 'c:\windows\system32\unzip.exe' for me to see if this application get installed...

Please try a shell run with this line 'c:\windows\system32\unzip.exe' - you should see a basic notification on options available in unzip.exe

I would also like to know what window system you use, autoit3 revision and if you changed any paths in your autoit3 system...

The inclose difference 'windows revision related' should be taken care of if you look at line 322 in the provided script but as I'm only using winXP home computers I can't test this function...

display the currently installed Beta version :

Well it should do so and does on my computer under current autoit details...

Thanks for notification on the trouble...

kjactive :P

Edited by kjactive

Share this post


Link to post
Share on other sites

Well I tryed to change the updater to use a zip component - XStandard.Zip and got almost the totally autoit3 system removed in three seconds ( don't use this component ) and therefore I still use an external program 'Unzip.exe' that should durring the installation process get copied to the current windows revision system drawer, in most cases called system32 - please check path 'c:\windows\system32\unzip.exe' for me to see if this application get installed...

Please try a shell run with this line 'c:\windows\system32\unzip.exe' - you should see a basic notification on options available in unzip.exe

I would also like to know what window system you use, autoit3 revision and if you changed any paths in your autoit3 system...

The inclose difference 'windows revision related' should be taken care of if you look at line 322 in the provided script but as I'm only using winXP home computers I can't test this function...

Well it should do so and does on my computer under current autoit details...

Thanks for notification on the trouble...

kjactive :P

Problem persists with version 1.6.2.

I suggest using single quotes for strings and double quotes as needed. For example:

RunWait ( '"' & @ProgramFilesDir & '\AutoIt3\Au3Update\Library\' & $SetupProg & '"' )

Reworking the unzip command line similarly should fix that problem too.

Other touches that would help:

If the Beta is installed, display what version it is.

Add the ability to add a switch to the AutoIt setup programs - specifically /S since they can now both be run with that option to install automatically.

Thanks.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

I can't quiet understand what is wrong in your case as I do not use RunWait to download to the library in my application, I use INetGet with a wait until finishhed but one thing I noticed in the last update is that with autoit3 beta update .3.1.1.100 there is no real update to the file autoit3.exe and it will offcourse then show a failure as this file is still rev. 99 and there is no changes to read in the filesystem version - this last update was only UDF and docs updates, I think...

Questen:

1.Do the file showup in the library path - this can be opened by the application menu...

2.Do unzip do a stdout with some text...

3.What is you path for autoit3...

4.Windows system OS?

I did change the string to run unzip in last update and it's now cable on doing paths with blank characters...

You got to help a bit more in this isue as I do not get any errors...

kjactive :P

Edited by kjactive

Share this post


Link to post
Share on other sites

here is a couple of suggested changes/ bug fixes for you.

Func Download($DownUrl, $DownName,$whereto)

;===== elTorro's suggested changes ====== 
    $DownTemp = @ScriptDir & '\Library\'

;fixes download crash if dir does not exist
    if Not FileExists($DownTemp) Then
        DirCreate($DownTemp)
    EndIf
    $DownTemp= $DownTemp & $DownName

;see if file already exists before downloading again
    if FileExists($DownTemp) Then
        $iOverwrite= msgbox(4116,"Au3Update","File Exists, Overwrite?")
        if $iOverwrite <> 6 then

        ;== offer to install it
            $iInstall = msgbox(4132,"Au3Update","Install Current File.?")
            if $iInstall = 6 Then 
                Install($whereto)
            EndIf   
            Return
        EndIf
    EndIf
;== end changes here

    GUICtrlSetData($LabelC,'Info: Download in progress - Please wait')
    If InetGet($DownUrl, $DownTemp, 1, 1) = 0 Then
        GUICtrlSetData($LabelC,'Info: Download failed')
        Return
    EndIF
    GUICtrlSetData($LabelC,'')
    GuiCtrlSetColor($LabelC,0x008000)
    $size = InetGetSize($DownUrl)/$bar
    $a = 0
    While @InetGetActive 
        $tmp = StringSplit(@InetGetBytesRead / $size,'.')
        IF $tmp[1] <> $a Then StatusBar()
        $a = $tmp[1]
    Wend
    GuiCtrlSetColor($LabelC,0x000000)
    GUICtrlSetData($LabelC,'Info: Download done')

;== determine Install method
    Install($whereto)
    
;== suggest new func--> Install($towhere)
;~  If $Notify = 1 Then
;~      GUICtrlSetData($LabelC,'Info: Auto install process on - Please wait')
;~      RunCom('"'&$DownTemp&'"',0,$whereto)
;~  ElseIf MsgBox(68,"REQUEST...","Download is compleated - Continue intsall") = 6 Then
;~      GUICtrlSetData($LabelC,'Info: Install process on - Please wait')
;~      RunCom('"'&$DownTemp&'"',0,$whereto)
;~  Else
;~      GUICtrlSetData($LabelC,'Info: Cancel done')
;~  ;FileDelete($DownTemp)
;~  EndIf

EndFunc
;==================================================================
;Install:  Determine install method
;Arguments: passes $whereto string on as $towhere
;==================================================================
Func Install($towhere)
    If $Notify = 1 Then
        GUICtrlSetData($LabelC,'Info: Auto install process on - Please wait')

;== added quotes for paths with spaces
        RunCom('"'&$DownTemp&'"',0,$towhere)
    ElseIf MsgBox(68,"REQUEST...","Download is compleated - Continue intsall") = 6 Then
        GUICtrlSetData($LabelC,'Info: Install process on - Please wait')
;== same here.
        RunCom('"'&$DownTemp&'"',0,$towhere)
    Else
        GUICtrlSetData($LabelC,'Info: Cancel done')
    ;FileDelete($DownTemp)
    EndIf
EndFunc

Keep up the good work. :P

Share this post


Link to post
Share on other sites

The update is great! I love the ability to download and unzip - I think, except it's still not working.

There's a problem in the last version (which I think I wrote to you about) that's still present with both the AtutoIt installation routine and the Unzip routine. If I attempt to download and run an AtuoIt beta update, it downloads to the library fine, but when it attempts to run, I get the error message:

Windows cannot find 'C:\Program'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search.

It looks like the RUN line in your code needs to put double quotes around the command line. You're probably doing something like:

Run ( $InstProg )

and it needs to be

Run ( '"' & $InstProg & '"' )
to be able to interpret the space between Program and Files. Same thing with unzipping - it's not doing anything probably because there's a space in the command line.

It would also be helpful if it displayed the currently installed Beta version (available in the AutoIt reg key).

None the less, it's a nice little program.

Problem persists with version 1.6.2.

I suggest using single quotes for strings and double quotes as needed. For example:

RunWait ( '"' & @ProgramFilesDir & '\AutoIt3\Au3Update\Library\' & $SetupProg & '"' )

Reworking the unzip command line similarly should fix that problem too.

Other touches that would help:

If the Beta is installed, display what version it is.

Add the ability to add a switch to the AutoIt setup programs - specifically /S since they can now both be run with that option to install automatically.

Thanks.

Hey JerryD did you ever get that problem of 'C:\Program' fixed? The reason I ask is, I'm not sure if it is the quotes making it mess up, but I had a problem with a file with no extension called "program" on my D: drive (where autoit is located) a while back. It was being stupid and wouldn't let any programs run, because the autoit exe was trying to execute through it (or something). The link is here: http://www.autoitscript.com/forum/index.php?showtopic=18867 You might want to check your C: drive for a file called program. If that's not the case, then maybe it truly is the program. As I haven't run it yet, I cannot be certain - it just reminded me of the problem I had and I wanted to check.

Share this post


Link to post
Share on other sites

@Greenmachine & JerryD:

I had a problem similar to JerryD when I tried Au3Update with the beta exe. I did a quick debug and fixed it with the code in my previous post. In my case the quotations marks had to be added in the run statements as DOS crashes on spaces in the path without them.

@kjactive:

Well I tryed to change the updater to use a zip component - XStandard.Zip and got almost the totally autoit3 system removed in three seconds ( don't use this component ) and therefore I still use an external program 'Unzip.exe' that should durring the installation process get copied to the current windows revision system drawer, in most cases called system32 - please check path 'c:\windows\system32\unzip.exe' for me to see if this application get installed...

I modified your code to use Xzip if you like I could pm it to you.

eltorro

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Well I think I found the trouble and fix it and added some extra functions...

1.The install script was buggy and did not provided some vital paths - fixed ( did the major trouble )...

2.Paths with blanc characters ruined the download process, add quotes - fixed...

3.Proved some extra failure checking...

4.Add a system information page to display all revisions on autoit3 vital applications...

5.Add MSAgent 'Genie' character guided tour - if available in local system...

6.Add a last update information line to display last update succes...

7.Add a third party update editor to include these updates as well - no limits, Koda and SciTe example is included...

Hope this fixes the trouble - Install / Uninstaller script, Code and a topics included...

download from site:

http://www.sitecenter.dk/latenight/nss-fol...e/Au3Update.exe

Thanks for suggestens 'eltorro' - I added The library checkin that should be done by the installer process but I think you do it a wrong spot in the script as I always do these kind of checkins where the intuition is displayed but the script is still holding and that's just before the msg process starts but the user has not jet begin to do any activations...

A waning about XStandard.Zip component - I tryed to include that one and I got my whole autoit directory wiped out more than ones, THAT COMPONENT HAS A RISKY BEHAVEIOR OR A BACKDOOR INCLUDED - do not use it...

kjactive :lmao:

Edited by kjactive

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Well I think I found the trouble and fix it and added some extra functions...

1.The install script was buggy and did not provided some vital paths - fixed ( did the major trouble )...

2.Paths with blanc characters ruined the download process, add quotes - fixed...

3.Proved some extra failure checking...

4.Add a system information page to display all revisions on autoit3 vital applications...

5.Add MSAgent 'Genie' character guided tour - if available in local system...

6.Add a last update information line to display last update succes...

7.Add a third party update editor to include these updates as well - no limits, Koda and SciTe example is included...

Hope this fixes the trouble - Install / Uninstaller script, Code and a topics included...

download from site:

http://www.sitecenter.dk/latenight/nss-fol...e/Au3Update.exe

Thanks for suggestens 'eltorro' - I added The library checkin that should be done by the installer process but I think you do it a wrong spot in the script as I always do these kind of checkins where the intuition is displayed but the script is still holding and that's just before the msg process starts but the user has not jet begin to do any activations...

A waning about XStandard.Zip component - I tryed to include that one and I got my whole autoit directory wiped out more than ones, THAT COMPONENT HAS A RISKY BEHAVEIOR OR A BACKDOOR INCLUDED - do not use it...

kjactive :lmao:

NOPE

OK, I don't know how else to put it, but I'll try. When you RUN a command, if there is a space character in the command's string (or parameter strings for that matter), the string MUST have DOUBLE QOTES around it. If it doesn't, it parses incorrectly. Even if there is NOT a space in the command or paramater string, it will still work correctly if it's surrounded with double quotes, so ALWAYS DO IT THAT WAY.

Had I realized the source code was included with the utility (why does it have a different name?), I would have done this MONTHS ago. Here are the line numbers that are causing the problem when downloading the Production or Beta and Install EXE are selected, and the fixed code:

Line 381:

Run($StartStr & '"' & $StartPath & '"', '', @SW_HIDE)

Line 399:

Run($StartStr & '"' & $StartPath & '"', '', @SW_HIDE)

When I changed these lines in Au3Update_Pre.au3 and compiled it, the Beta download ran after downloading.

As a side note, the only reason that $StartStr works, is because @ComSpec almost NEVER evaluates to a string with a space in it. However, if someone installed Windows and specified "Windows XP" as the Windows directory, this would fail too (I've seen people do it - and it screws up a LOT of things because no one ever expects the @WinDir to have a space in it! WHY Microsoft chose to have all programs installed under "Program Files" instead of "ProgramFiles" is beyond me, but I've been bitching about that for 12 years now!

Note that this does NOT fix Unzipping. I tried to bring down Koda, but the Autoit3\Koda directory (which didn't exist before or after I tried - and wasn't created) was empty (I tried it again after I created the directory manually) after trying it. Again, the Zip file needs to have QUOTES around the full path for it to work. And are you creating the directory the zip files are unzipped to if they don't exist?

[ If NOT FileExist ( $UnzipPath ) then DirCreate ( $UnzipPath ) ] - (that's not the actual code needed).

Also, although it works, and maybe you have it for versatility, but you don't need to run the production or beta installs with @Comspec - you can drop $StartStr & from both lines above if those lines aren't running the Unzip command (doesn't look like they are).

Jerry

P.S.

I think I found the problem with the Zip files. The default destination directory to unzip to is "C:\Programmer\Autoit3\Koda" and "C:\Programmer\Autoit3\SciTe". (WTFI Programmer???)

This is why programmers should use the SLOWEST machines running the absolute minimum STANDARD INSTALLATIONS of Windows. If THEY were running slow machines, and standard installations, maybe we'd have less bloated code that worked!

Edited by JerryD

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

Well I just don't get this as I just did one test on this subject and no trouble, I use XP home add. Upd.1 and 2 on three computers and no trouble at all...

OK, I don't know how else to put it, but I'll try. When you RUN a command, if there is a space character in the command's string (or parameter strings for that matter), the string MUST have DOUBLE QOTES around it. If it doesn't, it parses incorrectly. Even if there is NOT a space in the command or paramater string, it will still work correctly if it's surrounded with double quotes, so ALWAYS DO IT THAT WAY.

I just made an install with this 'C:\Programmer\Autoit3\Au3Update\Library\Autoit 3.1.1.100.zip' ( blank character ) and there was no trouble - could you provide me a line here that do the trick? as I would like to learn? - I did put in dubble quetes around commandline argument!!!

Had I realized the source code was included with the utility (why does it have a different name?), I would have done this MONTHS ago. Here are the line numbers that are causing the problem when downloading the Production or Beta and Install EXE are selected, and the fixed code:

That's because I did a Preprocess with my Au3Preprocessor that exclude all non wanted code like blank lines inbetween and include all UDF functions and not the whole UDF etc., this application attach an _Pre suffix but the code is alright and match the origin script elsewhere...

Run($StartStr & '"' & $StartPath & '"', '', @SW_HIDE)

I can see what you state but I do not change anything before I compleatly understand the problem so drop me a line that my Run function would fail on and I'll change it and hopefully learn something...

WHY Microsoft chose to have all programs installed under "Program Files" instead of "ProgramFiles" is beyond me

True - Microsoft%&¤%65t6¤...

Note that this does NOT fix Unzipping. I tried to bring down Koda, but the Autoit3\Koda directory (which didn't exist before or after I tried - and wasn't created) was empty

Well strange as Unzip should create the directory and do on my computer - I just removed Koda and did a new test and it came out nicely ( well no blank characters inbetween but anyway ) BUT the path included in the examples relate to my path maybe you have to change this in the editer - checkit out...

If NOT FileExist ( $UnzipPath ) then DirCreate ( $UnzipPath ) ] - (that's not the actual code needed).

You can't do this/no need with the unzip utility as this application creates the directory if this do not exists already...

P.S.

I think I found the problem with the Zip files. The default destination directory to unzip to is "C:\Programmer\Autoit3\Koda" and "C:\Programmer\Autoit3\SciTe". (WTFI Programmer???)

This is why programmers should use the SLOWEST machines running the absolute minimum STANDARD INSTALLATIONS of Windows. If THEY were running slow machines, and standard installations, maybe we'd have less bloated code that worked!

I do not understand this as code should work no matter computers and speed and I can't undo installations on my computers but I do test my applications on different systems and speed. In the old days I had an WinME, Win2K and WinXp running a test before release but now I only use XP as this is kind of old and soon exchanged but the computers is between AMD 1000Mhz and 3000+ and I got a laptop running Intel and all different in setups and still Au3Update do not make any trouble on anyone of these computers so PLEASE provide me a line to my Run command that would fail and I'll change the line BUT I like to learn before?

Thanks for the responce...

kjactive :lmao:

Edited by kjactive

Share this post


Link to post
Share on other sites

sorry you had trouble with Xzip. It seems to work fine for me and I do not see any INet activity when it's called.

Anyway......

at line 982 in the current down load,

If WinExists("AutoIt3 System Information...") Then GUIDelete($ystemW)

should it be

If WinExists("AutoIt3 System Information...") Then GUIDelete($SystemW)

It was like that in the last version too. But I thought I in advertantly changed it.

Share this post


Link to post
Share on other sites

Well I just don't get this as I just did one test on this subject and no trouble, I use XP home add. Upd.1 and 2 on three computers and no trouble at all...

I just made an install with this 'C:\Programmer\Autoit3\Au3Update\Library\Autoit 3.1.1.100.zip' ( blank character ) and there was no trouble - could you provide me a line here that do the trick? as I would like to learn? - I did put in dubble quetes around commandline argument!!!

My first suggestion, as I said above, is to install to "C:\Program Files". That's the way 99.99% of the people that may use your program will see it, and the other 0.01% won't have a problem if they use C:\Programmer.

Also, I did mention above that the major problem with the Zip file was that the default INI file that was installed referenced C:\Programmer instead of C:\Program Files. Again, non standard.

See how that goes.

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

Well I just did your test and made a copy to C:\Program files\Au3Update and there was no trouble with the Autoit3_beta.zip install, I also made a test with a blank character in the name and still no trouble here...

I then did a test on the Koda.zip and you are right there was a a blocking line ( I really don't know why I did this line ) but after I removed it koda did work too...

You can't change the initial install path manually in the install intuition as this is fixed to where autoit3 is located so your Autoit must be located in program files too...

default INI file that was installed referenced C:\Programmer instead of C:\Program Files. Again, non standard

True you have to edit these paths to match your paths, I included a special update editer to make life easy here...

I don't know about 'non standard' here as I seldom change path to the install process default paths and my 'programmer' directory is filled with applications as the 'Program files' directory is only filed with shared files etc. but it's my installer scriping software that picked this path as the standard @Programdir but in XP it should actually be something like 'C:\Documents and settings\your name\programmer' but the windowsXP install process still creates 'C:\Programmer' path like most installer scripting software I know of still reference to this path as the default programmers path...

Check Au3Update out and drop me a note if this trouble is still around or gone with the wind...

Download from site:

http://www.sitecenter.dk/latenight/nss-fol...e/Au3Update.exe

eltorro: I can't see what's the differences in your two lines but it looks alright to me as this line checks for child windows opened and close these before the main window as I noticed that autoit3 gui closedown process takes the main windows first and then closes the rest and I will have it opposite in my global exit function - look more nature in this manner I think...

kjactive :lmao:

Edited by kjactive

Share this post


Link to post
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
Sign in to follow this  
Followers 0