Yeah should be possible if it is possible to get the window title.Marco wrote: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?
SimpleUpdater
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
-
drewkeller
- Posts: 33
- Joined: 01 Nov 2008 05:29
Re: SimpleUpdater
Check out the console command (graceful if you leave off the /F switch)
Or for vbscript something like (I don't think vbs has any native way to do it gracefully)
Or I imagine you could use an AutoIt script exported out to an exe
Code: Select all
taskkill /IM xyplorer.exe
taskkill /IM xycopy.exe
Code: Select all
sub killProcess(strProcessName)
set colProcesses = GetObject("winmgmts:\\.\root\cimv2").ExecQuery("Select * from Win32_Process Where Name='" & strProcessName & "'")
if colProcesses.count <> 0 then
for each objProcess in colProcesses
objProcess.Terminate()
next
end if
end sub
killProcess "xyplorer.exe"
killProcess "xycopy.exe"
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
Yeah, was going to suggest task kill but it's not supported in xp home and 2000 i think.drewkeller wrote:Check out the console command (graceful if you leave off the /F switch)Or for vbscript something like (I don't think vbs has any native way to do it gracefully)Code: Select all
taskkill /IM xyplorer.exe taskkill /IM xycopy.exeOr I imagine you could use an AutoIt script exported out to an exeCode: Select all
sub killProcess(strProcessName) set colProcesses = GetObject("winmgmts:\\.\root\cimv2").ExecQuery("Select * from Win32_Process Where Name='" & strProcessName & "'") if colProcesses.count <> 0 then for each objProcess in colProcesses objProcess.Terminate() next end if end sub killProcess "xyplorer.exe" killProcess "xycopy.exe"
Re: SimpleUpdater
I confirm, taskkill is available only as part of a Resource Kit for older Windows. That's the same problem I faced when writing my updating script: XP doesn't offer all the batch commands available in 7.serendipity wrote:Yeah, was going to suggest task kill but it's not supported in xp home and 2000 i think.
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]
-
drewkeller
- Posts: 33
- Joined: 01 Nov 2008 05:29
Re: SimpleUpdater
Perhaps the new Exit command can have the option "a" (all) to close all XYplorer and XYcopy windows... ? Seems like that would be the cleanest and most reliable solution. Then you could (if you need to do it externally for some reason)
If you're doing it from inside XY, obviously all you need is the script command.
Code: Select all
' Close all XY windows (with save) and block until it completes
cmd.exe /k "xyplorer.exe /win=min /flg=2 /script="::Exit 'sa'" "
-
admin
- Site Admin
- Posts: 64835
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SimpleUpdater
Each XYplorer has its own garbage (XYcopy) collection. One cannot just kill XYcopy instances from outside because they might be doing important things.
FAQ | XY News RSS | XY X
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
Good point, i'll include this maybe:admin wrote:Each XYplorer has its own garbage (XYcopy) collection. One cannot just kill XYcopy instances from outside because they might be doing important things.
Code: Select all
IF (get ("XYcopy_Pending")!=0){
end 1==1, "Cannot update, XYcopy running.";
}
Last edited by serendipity on 13 Sep 2012 17:53, edited 1 time in total.
-
admin
- Site Admin
- Posts: 64835
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SimpleUpdater
No, this is unknown.serendipity wrote:Also, can get("instance") enumerate how many open instances?
FAQ | XY News RSS | XY X
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
OK, thanks.admin wrote:No, this is unknown.serendipity wrote:Also, can get("instance") enumerate how many open instances?
-
klownboy
- Posts: 4397
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440
Re: SimpleUpdater
serendipity, very slick and even nicer now without the need of a support file. It deserved it's own place on my toolbar.
Thanks,
Ken
Thanks,
Ken
- Attachments
-
- SimpleUpdater.JPG (40.17 KiB) Viewed 4131 times
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
Thanks. Nice buttons there!klownboy wrote:serendipity, very slick and even nicer now without the need of a support file. It deserved it's own place on my toolbar.
Thanks,
Ken
Re: SimpleUpdater
I assigned it the XY-logo as a button since it's calling home.
Cheers,
Filehero
Cheers,
Filehero
Re: SimpleUpdater
Hi,
I'm still excited, this updater is an awesome script. The functional impact per LoC is tremendous!
Cheers,
Filehero
I'm still excited, this updater is an awesome script. The functional impact per LoC is tremendous!
Cheers,
Filehero
-
klownboy
- Posts: 4397
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440
Re: SimpleUpdater
Hey Filehero, it's been awhile. Yes, I just changed my icon over to the XYplorer logo as well. For anyone interested you can grab it by typing in http://www.xyplorer.com/favicon.ico into your address bar and then right click on the logo to save it to your drive.
Thanks,
Ken
Thanks,
Ken
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: SimpleUpdater
Thanks!Filehero wrote:Hi,
I'm still excited, this updater is an awesome script. The functional impact per LoC is tremendous!
![]()
Cheers,
Filehero
XYplorer Beta Club