IE context menu: Open Link Sandboxed

Utilities designed for use with Sandboxie
Post Reply
TimRude
Posts: 6
Joined: Tue Jun 24, 2014 11:01 am

IE context menu: Open Link Sandboxed

Post by TimRude » Fri Jul 21, 2017 5:25 pm

Sometimes I'm viewing a trusted website open in IE (not sandboxed) and I see a link on a page to another site that I'd like to check out, but I want to check out the link in a sandbox. Presently I have to copy the link to the clipboard, open up IE in a sandbox, and then paste the link into the address bar. Would be much easier if there was a right-click context menu entry in IE to 'Open Link Sandboxed' that would automatically open a new instance of IE in the sandbox and go to the link.

Has anybody already created a nifty registry tweak (presumably to HKCU\Software\Microsoft\Internet Explorer\MenuExt) to do this?

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2337
Joined: Mon Nov 07, 2016 3:10 pm

Re: IE context menu: Open Link Sandboxed

Post by Barb@Invincea » Fri Jul 21, 2017 5:30 pm

Hello TimRude,

If you have the paid version of Sandboxie, you can use Forced Program:
https://www.sandboxie.com/index.php?Pro ... gs#program

Is there any reason why you don't want to run IE Sandboxed all the time instead?

Regards,
Barb.-

TimRude
Posts: 6
Joined: Tue Jun 24, 2014 11:01 am

Re: IE context menu: Open Link Sandboxed

Post by TimRude » Fri Jul 21, 2017 5:35 pm

For most sites I do run sandboxed, but there are some that I don't. I always empty the sandbox upon closing it, and there are some sites that I want to keep temp data (cookies, etc.) persistent for while others get purged.

So I don't want to always have my browser open in a sandbox. I'd just like to be able to open a specific link directly in a sandboxed browser.

TimRude
Posts: 6
Joined: Tue Jun 24, 2014 11:01 am

Re: IE context menu: Open Link Sandboxed

Post by TimRude » Fri Jul 21, 2017 10:05 pm

Well, after some tinkering I think the following gets it done nicely:
  1. Extract (from the attached zip file) the file named SBIELauncher.hta to your "C:\Program Files\Sandboxie" folder. The content of this file is:

    Code: Select all

    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <script type="text/javascript" language="JavaScript">
    <!--
    	// Set the window to zero size, since we do not intend
    	// to use this window.
    	window.resizeTo(0, 0);
    	window.dialogWidth = 0;
    	window.dialogHeight = 0;
    -->    
    </script>
    
    <head xmlns:HTA="urn:microsoft:hta">
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<HTA:APPLICATION 
    		ID="oHTA"
    		APPLICATIONNAME=""
    		BORDER="dialog"
    		BORDERSTYLE="normal"
    		CAPTION="no"
    		MAXIMIZEBUTTON="no"
    		MINIMIZEBUTTON="yes"
    		SCROLL="no"
    		SHOWINTASKBAR="yes"
    		SINGLEINSTANCE="no"
    		SYSMENU="no"
    		CONTEXTMENU="no"
    		VERSION="1.0"
    		WINDOWSTATE="minimize"/>
    </head>
    
    <body>
    </body>
    
    <script type="text/javascript" language="JavaScript">
    <!--
    	try
    	{
    		// Get the context menu link...
    		var shell = new ActiveXObject("WScript.Shell");
    		var URL = external.menuArguments.event.srcElement;
    	    
    		// Launch Sandboxie default browser, passing the URL as the parameter
    		var cmdLine = "\"C:\\Program Files\\Sandboxie\\Start.exe\" default_browser " + URL;
    		shell.run(cmdLine);
    		
    		// Close the window
    		window.close();
    	}
    	catch(e)
    	{
    	}
    -->    
    </script>
    </html>
    
  2. Extract (from the attached zip file) the file named OpenInSandbox.reg to your desktop. Then right-click it and select Merge to update the registry. You can delete this file once the registry has been updated. The content of this file is:

    Code: Select all

    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Open in Sandbox]
    @="C:\\Program Files\\Sandboxie\\SBIELauncher.hta"
    "Contexts"=dword:00000020
    
  3. Once that's done and you restart Internet Explorer, you should now see a new context menu entry named Open in Sandbox when you right-click on a link on a web-page. Selecting it should open the link in a sandbox, even if you were viewing the web-page in a non-sandboxed instance of Internet Explorer.
  4. Note that if your system is configured differently so that C:\Program Files\Sandboxie is not where your Sandboxie installation is located, some editing of the two files will be necessary before using them.
Attachments
OpenInSandbox.zip
(1.2 KiB) Downloaded 3141 times

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2337
Joined: Mon Nov 07, 2016 3:10 pm

Re: IE context menu: Open Link Sandboxed

Post by Barb@Invincea » Mon Jul 24, 2017 11:12 am

Hello TimRude,

I have moved your thread to the Contributed Utilities & Templates section.

Thank you,
Barb.-

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests