Setting XYplorer as the default explorer

Features wanted...
Post Reply
thbernt
Posts: 3
Joined: 09 Oct 2008 09:39

Setting XYplorer as the default explorer

Post by thbernt »

It is explained in the Wiki how XYplorer can be set as the default explorer in Windows. It is easy to make an mistake here. So I suggest that this is made as an option in XYplorer. I suggest a checkbox that the user can check to make XYplorer as the default explorer, when the checkbox is unchecked the default Windows explorer is set back as the default explorer.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Setting XYplorer as the default explorer

Post by j_c_hallgren »

Hi and welcome to the XY forums!

In a nutshell, as I see it, the main reason why this would not be done is that XY would then affect the registry and thus lose it's claim that "Registry is not touched", so by having the user make those changes, it's still 'clean'...yes, it's possible that errors can occur, but given the detailed instructions in wiki, it's fairly easy, IMHO.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Setting XYplorer as the default explorer

Post by admin »

j_c_hallgren wrote:Hi and welcome to the XY forums!

In a nutshell, as I see it, the main reason why this would not be done is that XY would then affect the registry and thus lose it's claim that "Registry is not touched", so by having the user make those changes, it's still 'clean'...yes, it's possible that errors can occur, but given the detailed instructions in wiki, it's fairly easy, IMHO.
I think somebody could write a short script that would generate a reg-file (containing the user-specific paths) which would then be a one-dblclick solution for the user to integrate into the registry. Well, a least once I provide the writefile command in 7.80... :)

thbernt
Posts: 3
Joined: 09 Oct 2008 09:39

Re: Setting XYplorer as the default explorer

Post by thbernt »

Isn't here allready an option that changes the registry? I'm thinking about "XYplorer" in shell context menu.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Setting XYplorer as the default explorer

Post by admin »

thbernt wrote:Isn't here allready an option that changes the registry? I'm thinking about "XYplorer" in shell context menu.
That's right. You found the only exception. However, this change is less "invasive" IMO, whereas changing the default file manager is a quite heavy change to your system.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Setting XYplorer as the default explorer

Post by jacky »

admin wrote:I think somebody could write a short script that would generate a reg-file (containing the user-specific paths) which would then be a one-dblclick solution for the user to integrate into the registry. Well, a least once I provide the writefile command in 7.80... :)
Yep, in the mean time one could try already using the Paste Text Into New File command though...

Code: Select all

"Make XYplorer The Default File Manager..."
	replace $XYpath, "<xypath>\<xyexe>", "\", "\\";
	$REGpath = (confirm("Associate XYplorer with drives & folders (to make it the default file manager) for the current user only ?<br><br>OK = Current User Only<br>Cancel = Global","<br>")) ? "HKEY_CURRENT_USER\Software\Classes" : "HKEY_CLASSES_ROOT";
	$reg = 'REGEDIT4<br><br>['.$REGpath.'\Drive\shell]<br>@="XYplorer"<br><br>['.$REGpath.'\Drive\shell\XYplorer]<br>@="Open in XYplorer"<br><br>['.$REGpath.'\Drive\shell\XYplorer\command]<br>@="\"'.$XYpath.'\" \"%1\""<br><br>['.$REGpath.'\Directory\shell]<br>@="XYplorer"<br><br>['.$REGpath.'\Directory\shell\XYplorer]<br>@="Open in XYplorer"<br><br>['.$REGpath.'\Directory\shell\XYplorer\command]<br>@="\"'.$XYpath.'\" \"%1\""<br>';
	$curpath = <curpath>;
	setting "AutoSyncTree", 0;
	setting "AutoRefresh", 0;
	setting "ResortAfterRename", 0;
	goto "%tmp%";
	$clipboard = <clipboard>;
	copytext $reg;
	#219; // Paste Text Into New File
	focus l;
	rename b, "Make XYplorer The Default File Manager.reg/e";
	$regfile = <curitem>;
	copytext $clipboard;
	goto $curpath;
	run """$regfile""";
	load ((confirm("Press OK once the REG file has been applied to your registry to delete the file")) ? ('delete 0, 0, "'.$regfile.'";') : 'incr $void;'),,s;
Which reminds me, I thought I reported this already, but I might have not done it yet actually : confirm does support a line breaker parameter, but doesn't use the "global" default value (and command br) which is quite odd to me. Why does it not work as for copytext, msg, etc that would be much more natural/expected behavior (to me) ?
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Setting XYplorer as the default explorer

Post by admin »

jacky wrote:Which reminds me, I thought I reported this already, but I might have not done it yet actually : confirm does support a line breaker parameter, but doesn't use the "global" default value (and command br) which is quite odd to me. Why does it not work as for copytext, msg, etc that would be much more natural/expected behavior (to me) ?
I'm aware of it but it's currently not possible because confirm() is a function which is handled a bit different internally.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Setting XYplorer as the default explorer

Post by admin »

jacky wrote:Which reminds me, I thought I reported this already, but I might have not done it yet actually : confirm does support a line breaker parameter, but doesn't use the "global" default value (and command br) which is quite odd to me. Why does it not work as for copytext, msg, etc that would be much more natural/expected behavior (to me) ?
The "br" command to set the line breaker is currently working on the local script stack, not globally. I could, however, make the line breaker global (scrope and lifetime for the whole script batch including any sub-scripts). Then it would be easy to add the default to confirm.

The question is: Would a global line breaker be good? Probably not, because then even sub-scripts could change the value that might later be used in the calling scripts.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Setting XYplorer as the default explorer

Post by jacky »

admin wrote:The "br" command to set the line breaker is currently working on the local script stack, not globally. I could, however, make the line breaker global (scrope and lifetime for the whole script batch including any sub-scripts). Then it would be easy to add the default to confirm.

The question is: Would a global line breaker be good? Probably not, because then even sub-scripts could change the value that might later be used in the calling scripts.
Yeah, no, might not be a good idea. I think I'd much rather keep go for adding ,"<br>" to all confirm-calls than having to add br "<br>" to each scripts just in case...
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Setting XYplorer as the default explorer

Post by admin »

jacky wrote:
admin wrote:The "br" command to set the line breaker is currently working on the local script stack, not globally. I could, however, make the line breaker global (scrope and lifetime for the whole script batch including any sub-scripts). Then it would be easy to add the default to confirm.

The question is: Would a global line breaker be good? Probably not, because then even sub-scripts could change the value that might later be used in the calling scripts.
Yeah, no, might not be a good idea. I think I'd much rather keep go for adding ,"<br>" to all confirm-calls than having to add br "<br>" to each scripts just in case...
Yo, done.

Post Reply