General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Open URL shortcut in IE with K-M as default browser?
Posted by: 666
Date: March 25, 2005 04:03AM

On my Windows XP setup, I've set K-M as default browser to open shortcuts with the .URL extension (those links on your desktop when you hit 'create shortcut' in IE).

Then I used the folder options/file types panel to make an extra entry: "open with IE", which I associated with iexplore.exe.

But this option doesn't work. First I get a warning message ('some files can harm your computer...'), then the page opens with K-M instead of IE.

How can I fix this?

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: kko
Date: March 28, 2005 09:59PM

Create a new text file and paste the following (without asterisks) :
***
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<package>

<job>
<?job error="true" debug="true" ?>
<runtime>
<unnamed name="URL-file" helpstring="the URL-file to launch" required="true" many="false" />
</runtime>
<script language="JScript">
<![CDATA[
if (!WScript.Arguments.length) {
WScript.Arguments.ShowUsage();
WScript.Quit();
}
var WSS = new ActiveXObject("WScript.Shell");
var FSO = new ActiveXObject("Scripting.FileSystemObject");
var IE = WSS.ExpandEnvironmentStrings("\"%ProgramFiles%\\Internet Explorer\\IExplore.exe\" \"");
var t = WScript.Arguments.Unnamed.Item(0);
if (FSO.FileExists(t)) {
var u = FSO.OpenTextFile(t,1,false), v = "";
while (!u.AtEndOfStream) {
v = u.ReadLine();
if (v.indexOf("URL=")==0) {
v = v.substring(4,v.length-1);
break;
} else v = "";
}
if (v) WSS.Run(IE+v+"\""); else WScript.Arguments.ShowUsage();
} else WScript.Arguments.ShowUsage();
]]>
</script>
</job>
</package>
***
Rename the text file to <whateverYouWant>.wsf

Now associate this windows script file with url files, as You have done with IE before. This should then work as you expected.

By the way: You know we are absolutely off topic here ?!

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: 666
Date: April 02, 2005 02:42AM

Thanx for the script!

Doesn't work though. No matter where I put it or how I call it, if I try to make the entry in folder options/file types, an error box tells me:

"The specified program could not be found..."

Seems like XP doesn't let me associate file types with scripts.

Any other suggestions?

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: Jake
Date: April 02, 2005 05:29PM

Be advised that you've ALL READY given MSFT permission to mess with your computer. I've installed software on XP machines and then not be allowed to use it. The following from the complete article at: http://www.hevanet.com/peace/microsoft.htm


An article from Microsoft called Managing Automatic Updating and Download Technologies in Windows XP [microsoft.com] mentions 11 ways in which Windows XP components automatically download software from Microsoft computers. The article says,

"Outlined below is a list of components, applications, and technologies discussed in this whitepaper that have the ability to automatically download and install updated software and information from the Internet."

Note that this does not say that the 11 are the only ways that Microsoft XP connects with Microsoft's computers. It says that the 11 are the only ones "discussed in this whitepaper".

The Microsoft article tells how to disable the hidden downloading. However, the disabling is very time-consuming. Also, Microsoft has a history of using defect fixes and security fixes to change the operating system settings. This means that all the settings would need to be checked after every defect fix or security vulnerability fix.


You should also read about 'Trusted Computing.' `Trusted Computing' Frequently Asked Questions
- TC / TCG / LaGrande / NGSCB / Longhorn / Palladium / TCPA Version 1.1 (August 2003)
GO TO THIS SITE TO GET THE HTML VER WITH LINKS: http://www.cl.cam.ac.uk/~rja14/tcpa-faq.html

I don't use anything past Win98se, and I Explorer is always ripped out, plus other MSFT junks. Let's me run 98 with no swap file, andv very little virus junks. I don't think MSIE6 can't be ripped out of XP, but probably; you'd just have to find a file manager that worked. If you must use XP, real bad idea, go to http://www.litepc.com/ and gain some control over that piece of .....

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: 666
Date: April 02, 2005 11:16PM

Nice piece of spam, Jake, but why would I pay $40 for XPlite? I tamed XP with nlite for free.

And it doesn't download anything behind my back. My firewall takes care of that. No SP2 on my computer. I never even bothered with SP1.

BTW, the site you linked to looked promising at first glance, but then lost all of it's credibility by recommending to use ZoneAlarm. There are many excellent firewalls out there, but ZoneAlarm is not one of them. It's a piece of crap comparable to junk like Norton and BlackIce.

Running 98 is not an option. Ever tried handling 4+ GB DVD image files with FAT32?

Anyway, you didn't answer my question: how do I add 'open with IE' to my right-click menu in such a way that it works? Some sites simply don't work with anything other than IE, and the user agent setting in K-M doesn't fix that.

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: Brian
Date: April 02, 2005 11:35PM

i wish jake would shut up.

Brian

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: 666
Date: April 03, 2005 02:16AM
Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: rory
Date: April 03, 2005 02:36AM

666
That you dont have SP1 and SP2 doesnt make you in the know of security, so dont flame Jake.
If you knew something about Alternate Data Streams, you will newer open your mouth, and ditch XP in a blink of an eye.
Its been around since NT, but "Security experts" discovered it just now.
http://www.windowsecurity.com/articles/Alternate_Data_Streams.html

4+ GB DVD image files on FAT32?
Youre kidding.
You dont know that I can make FAT 32 Partition with
128K cluster size(instead of 4K default) and leave XP @!#$ box in the dust.
How pathetic.

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: 666
Date: April 03, 2005 03:02AM

Well, not really the answer. When I point the 'open with IE' entry to the 'open with IE' HTML file it opens IE, but it doesn't go to the right page.

A bit more tweaking left...

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: 666
Date: April 03, 2005 03:17AM

@ rory: jake deserved all the flaming he got here. If he wants to plug his 'XP is evil' story, let him find the right place for it instead of dunping his off-topic spam in a web browser forum.

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: kko
Date: April 03, 2005 10:23PM

@666: OK. I guess, I should give you more detailed instructions. There
may be several traps.

1) An updated version of my script to avoid potential strangenesses (I forgot to close the text file before exiting)

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<package>

<job>
<?job error="true" debug="true" ?>
<runtime>
<unnamed name="URL-file" helpstring="the URL-file to launch" required="true" many="false" />
</runtime>
<script language="JScript">
<![CDATA[
if (!WScript.Arguments.length) {
WScript.Arguments.ShowUsage();
WScript.Quit();
}
var WSS = new ActiveXObject("WScript.Shell");
var FSO = new ActiveXObject("Scripting.FileSystemObject");
var IE = WSS.ExpandEnvironmentStrings("\"%ProgramFiles%\\Internet Explorer\\IExplore.exe\" \"");
var t = WScript.Arguments.Unnamed.Item(0);
if (FSO.FileExists(t)) {
var u = FSO.OpenTextFile(t,1,false), v = "";
while (!u.AtEndOfStream) {
v = u.ReadLine();
if (v.indexOf("URL=")==0) {
v = v.substring(4,v.length-1);
break;
} else v = "";
}
u.Close();
if (v) WSS.Run(IE+v+"\""); else WScript.Arguments.ShowUsage();
} else WScript.Arguments.ShowUsage();
]]>
</script>
</job>
</package>

2) Create a new text file and open it with notepad or any text editor you like. Copy my script above from your browser and paste it into the text file. Have a look at the line beginning with "var IE =". This line should end with " \"");" and there should be a whitespace between "\\Internet" and "Explorer\\", NOT a line break. Save the file and close your editor.

3) Now rename the text file from <somename>.txt to <somename>.wsf. To be able to do this under WinXP, be sure that Windows-Explorer is showing you the file extension ".txt". Otherwise you would rename the file to <somename>.wsf.txt and this won't work of course. There is an appropriate option in control panel's folder options (section "view" or similar). When you have renamed the file, you can test it by dropping an *.url file on it. The target url should then open up in IE.

4) If drag and drop works, move the script file to it's final location. I recommend to move it into your program files folder. Let's assume it's path to be "C:\Program Files\<somename>.wsf" from now on.

5) Now we have to associate the script file with *.url files in control panel's folder options/file types dialog. You know how do do this, as you have told us. In your first attempt you have entered the command line

"C:\Program Files\Internet Explorer\IExplore.exe" "%1"

to your newly created entry. This won't work, because IE can't open an *.url file (nor any other browser can). An *.url file is actually an *.ini file, this means it is a text file with a special structure/syntax. You have to parse such a file for the relevant information (the shortcut's target url), and then launch IE (or any other browser you want) with the target url as a command line parameter. This is, what my script actually does.

In your second attempt, I guess, you have entered the command line

"C:\Program Files\<somename>.wsf" "%1"

This didn't work, as you told us. Now, try this command line:

WScript.exe "C:\Program Files\<somename>.wsf" "%1"

This should work now. (There is no doubt, that my script works. It works just fine on my system. But, of course, I can not know how you have tweaked your system winking smiley

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: 667
Date: April 04, 2005 04:09AM

Thanx! The file association part works, but there's still a bug to sort out.

Often (but not always), the last character of the URL is lost so your script takes me to a '404 not found' page instead.

Some examples of URLs that don't work:

http://europa.eu.int/scadplus/leg/en/lvb/l24173.htm
(the 'm' at the end is lost)
http://www.bioch.ox.ac.uk/aspsite/research/rgroupsnew.asp?Group_ID=42
(the final '2' is gone)
http://forum.zonelabs.org/zonelabs
(the 's' doesn't make it)

If the URL ends with an extension like htm, html, jpg, or a folder name without a slash at the end, the script eats the last character of the URL.

No problem for a folder (just add a / to the URL), but disastrous for shortcuts to html/htm/php/gif/jpg files.

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: kko
Date: April 04, 2005 08:02AM

You are right! This time it's my fault.

Solution: The line

v = v.substring(4,v.length-1);

should be

v = v.substring(4,v.length);

I hope, it now works to your contentment.

Options: ReplyQuote
Re: Open URL shortcut in IE with K-M as default browser?
Posted by: 666
Date: April 04, 2005 07:37PM

Works great now!

Options: ReplyQuote


K-Meleon forum is powered by Phorum.