SimpleUpdater
Re: SimpleUpdater
There's the <nun> thing (no upgrade notice) that you can add to the titlebar template to prevent that from showing.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
admin
- Site Admin
- Posts: 65244
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SimpleUpdater
It's even gone the next time you go to another folder!j_c_hallgren wrote:klownboy wrote: I get the following or something similar in the title bar, "XYplorer v10.60 updated from v10.50.0023". Isn't that the case with everyone's Titlebar after an update whether it's a beta or not? I then have to go into the Help / Update Registration Details and input the serial number "key" and do a restart, and then the title bar changes to "XYplorer v11.60".Does that "updated from x.xx.xxxx" part of title bar bother you THAT much? I barely even notice it and it's gone the next time you start XY anyway so...
FAQ | XY News RSS | XY X
-
klownboy
- Posts: 4407
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440
Re: SimpleUpdater
Ok, Ok, I give up!
Sorry, I thought I had to do that to make it disappear and no it wasn't that big a deal. Wow, have I been wasting time especially when you consider all the betas. Good thing I'm retired! I never realized it went away after a restart or like the boss said just simply moving to another folder.
Thanks Marco for the <nun> input in the Titlebar template. By the way, in the old days, did you need to do it? I ask only because I see the code to do that (i.e., getkey, setkey etc) in the old jackie updater script?
Thanks,
Ken
Thanks,
Ken
Re: SimpleUpdater
Hi serendipity,
installed and ran it on my desktop machine - great addition (*)!
How about a simple message if no update could have be found, thereby the "else"-path would become GUI-responsive/unambigous as well?
Cheers,
Filehero
*: Once native XY support for zip/rar is there this script should become a standard add-on!
installed and ran it on my desktop machine - great addition (*)!
How about a simple message if no update could have be found, thereby the "else"-path would become GUI-responsive/unambigous as well?
Cheers,
Filehero
*: Once native XY support for zip/rar is there this script should become a standard add-on!
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
Sorry, did not understand. You mean if no updates (or XY upto date) there should be a message?Filehero wrote:How about a simple message if no update could have be found, thereby the "else"-path would become GUI-responsive/unambigous as well?
I already have the status message that says you have the latest version.
Re: SimpleUpdater
Oh, I did miss the status message(*). Sorry for confusion!serendipity wrote:I already have the status message that says you have the latest version.
Cheers,
Filehero
*: Was a "nightmare" evening. While installing a new video card (decided to enjoy PC-Gaming after a 10 year break) I broke the sata-plug of my system ssd hosting my Win 7. After "quickly" restoring Win 7 to another partition I realized I totally mixed up the boot file records (boot sector, boot manager - simply everything
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
Good news!!
Seems like I can use vb script to unzip files (as far as i know all windows have vbscript.dll inbuilt).
This means the need for any third party unzipping is eliminated.
I now unzip files to a temporary location and update XYplorer. The temp file is deleted later.
Can you guys confirm if this is working??
Seems like I can use vb script to unzip files (as far as i know all windows have vbscript.dll inbuilt).
This means the need for any third party unzipping is eliminated.
I now unzip files to a temporary location and update XYplorer. The temp file is deleted later.
Can you guys confirm if this is working??
Code: Select all
//SimpleUpdater
/*
WHY SIMPLE?
1) No configuration, just copy this script to XY's scripts folder, thats it.
2) Uses the inbuilt vbscript.dll to unzip files (no 3rd party unzips required)
HOW IT WORKS:
1) Checks for beta or official release and shows the change log and an option to update.
2) Saves current configuration.
3) Downloads the XY zip file to scripts folder, closes XY (your config is saved already) and extracts downloaded files to XY folder.
4) Restarts XY.
Notes:
1) temp folder and vbs file is created in XY's script folder which is later deleted. (No junk left behind).
2) If you already have a temp file in xyscripts folder it will be deleted. (change the temp folder location below)
3) As before, everything works as it is, you can change paths below in "User-defined parameters" section
WHAT TO DO:
1) Copy SimpleUpdater script to XY's script folder.
2) To test paste this in address bar: ::load SimpleUpdater;
*/
//Declare global variables
global $downloadurl,$downloadpath,$downloadfile,$newver,$temp,$vbsfile;
//Stop script if XY version is less than 09.60.0004
end (<xyver> < "09.60.0004"), "This script needs XYplorer version 9.60.0004 or higher.";
$ReadURL = readurl("http://www.xyplorer.com/xyfc/viewtopic.php?t=4&start=0&sd=d", , , 2);
//If no internet then script exits with a status message
IF ($ReadURL==""){
status "No internet. Can't check for XY updates.","FF0000",alert;
end(1==1);
}
//Read URL and get new version number and compare with current version
$token=gettoken($ReadURL, 2, '<div class="codecontent">v');
$newver =gettoken ($token, 1, " -");
IF ($newver==<xyver>){
status "No updates, you have the latest version of XYplorer";
end(1==1);
}
ELSE{
Status "New XY version $newver available", "FF0000", "alert";
}
//User-defined Parameters
$downloadpath="<xyscripts>";//Path where new update will be downloaded
$downloadfile="$downloadpath\xy.zip"; //File name of the downloaded file
$temp="<xyscripts>\temp"; //Temporary location where unzipped contents and vbs file will be stored (and deleted thereafter)
$vbsfile="$temp\unzip.vbs"; //VBS file location
//Get update info
$newtoken= gettoken($ReadURL, 2, 'the new BETA');
$downloadurl=gettoken($newtoken, 1, '" class="postlink"><span style="font-weight: bold">No-Install Package');
$downloadurl=gettoken($downloadurl, 2, '(2) <a href="');
$newtoken1= gettoken($newtoken, 1, '<br /></div><br />To <span style="font-weight: bold">download');
$newtoken2= gettoken($newtoken1, 2, 'Change Log');
$newtoken2= gettoken(gettoken($newtoken, 1, '<br /></div><br />To <span style="font-weight: bold">download'), 2, 'Change Log');
IF($newtoken2==""){
//Download Official release
$newtoken2= gettoken($newtoken1, 2, 'XYplorer Official Release');
$newtoken2= gettoken($newtoken2, 1, 'faq.php" class="postlink">FAQ</a>');
$newtoken2= gettoken($newtoken2, 1, '<br /></div></div>');
$newtoken2= gettoken($newtoken2, 2, 'class="codetitle"><b>Code:</b></div><div class="codecontent">');
$newtoken2="<b>Change Log:
$newtoken2";
$downloadurl="http://www.xyplorer.com/download/xyplorer_full_noinstall.zip";
}
ELSE {
$newtoken2= gettoken($newtoken2, 2, 'class="codetitle"><b>Code:</b></div><div class="codecontent">');
$newtoken2="<b>Change Log for the latest XYplorer BETA version:</b>
$newtoken2";
}
//Update window interface
$Updatewindow=<<<Updatewindow
<style type="text/css" rel="stylesheet">
#mysubmit { background-color: #00CC00; border:0.01cm solid black; cursor= hand; font-size: 110%; font-family:Arial; color: #FFFFFF;
height:30px;
font-weight: bold;}
#body { background-color: #FFFFFF; border:medium none; font-size: 75%; font-family:Verdana,Arial,Helvetica;height:25px; color:#000066 }
</style>
<FORM NAME="UpdateXY" ACTION="xys: "><FIELDSET>
<Legend><INPUT TYPE=SUBMIT title="Update to v$newver" name="submit" id="mysubmit" value="Update to v$newver">
</Legend>
<p id="body">$newtoken2</p>
</FIELDSET>
</FORM>
Updatewindow;
$Update= html ("$Updatewindow",600,600,"Update XYplorer");
IF ($Update Like "?submit=Update*"){
sub "_downloadXY";
}
ELSE{
status "SimpleUpdater closed", FF0000, alert;
end(1==1);
}
//Subscript that downloads, extracts and updates XY
"_downloadXY"
//Declare global variables
global $downloadurl,$downloadfile,$newver,$temp,$vbsfile;
//If temp file already exists, it will be deleted.
IF(exists($temp)==2){
delete (0,0,$temp);
}
new ("<xyscripts>\temp","dir");
new ("<xyscripts>\temp\extract","dir");
//Create vbs file
// Copies zip contents to temp\extract folder, then moves extracted files to XY
//Note: copying contents directly to XY is possible, but at the cost of user having to click "Yes to All" while copying.
$VBSUnzip=<<<VBSUnzip
ZipFile = "<xyscripts>\xy.zip" 'name of zip file
OutputFolder = "$temp\extract" 'temp folder for unzipped files
XYFile="<xypath>" 'XYplorer path
Set objShell = CreateObject( "Shell.Application" )
Set objSource = objShell.NameSpace(ZipFile).Items()
Set objTarget = objShell.NameSpace(OutputFolder)
intOptions = 16
objTarget.CopyHere objSource, intOptions
Set objShell = CreateObject( "Shell.Application" )
Set objSource = objShell.NameSpace(OutputFolder).Items()
Set objTarget = objShell.NameSpace(XYFile)
intOptions = 16
objTarget.MoveHere objSource, intOptions
VBSUnzip;
writefile("$vbsfile", "$VBSUnzip"); //Write vbs commands to file
savesettings; //Save all settings
download ($downloadurl,$downloadfile,o); //download latest XY
substr $drive, <xypath>, 0, 2;
substr $path, <xypath>, 2;
//Run: Title > Text > Wait > Run vbs > Delete temp > Start XY
run "cmd /c title SimpleUpdater && echo Updating from <xyver> to $newver... && ping -n 5 127.0.0.1 >nul && cscript //nologo ""$vbsfile"" && RD /S /Q ""$temp"" && start ""XYplorer"" $drive""$path""\<xyexe>";
#192; //Exit XY
Last edited by serendipity on 12 Sep 2012 23:25, edited 2 times in total.
-
admin
- Site Admin
- Posts: 65244
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SimpleUpdater
FYI, there is a command savesettings you can use instead of #182. 
FAQ | XY News RSS | XY X
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
Thanks! Can't get easier.admin wrote:FYI, there is a command savesettings you can use instead of #182.
BTW, is it safe to assume that all windows are vbs compliant?
Re: SimpleUpdater
@serendipity
Can you write VBS code also for closing every XY and XYcopy window after a delay?
Can you write VBS code also for closing every XY and XYcopy window after a delay?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
admin
- Site Admin
- Posts: 65244
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SimpleUpdater
I'll also add a new command Exit to get rid of those #192; ...serendipity wrote:Thanks! Can't get easier.admin wrote:FYI, there is a command savesettings you can use instead of #182.
FAQ | XY News RSS | XY X
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
Yeah, but #192 is not that bothersome.admin wrote:I'll also add a new command Exit to get rid of those #192; ...serendipity wrote:Thanks! Can't get easier.admin wrote:FYI, there is a command savesettings you can use instead of #182.
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
Close or kill??Marco wrote:@serendipity
Can you write VBS code also for closing every XY and XYcopy window after a delay?
Re: SimpleUpdater
Close. There should be a way to focus a window and then send an Alt+F4, but never investigated further...serendipity wrote:Close or kill??Marco wrote:@serendipity
Can you write VBS code also for closing every XY and XYcopy window after a delay?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
XYplorer Beta Club