# Set up an IE 9 VM with Amazon Workspaces
Created: 2023_03_22 21:17
Tags: [[Technology]]
At my job, I needed the ability to run the deprecated and decrepit IE9 to test web applications that I was writing. Doing that in 2023 from a mac is harder than you might think. On my previous machine, I was able to run [Virtualbox with the Windows Developer ISO](https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/), which I would recommend over this if you can possibly avoid it. I have one of the newer M1-based Macs that cannot run Virtualbox even through Rosetta. While it could probably run a Windows virtual machine through UTM, I found [the guide for it to be daunting](https://docs.getutm.app/guides/windows/) and after failing an attempt at it I thought there must be a better way.
## Set up the Windows Virtual Machine
For this, you'll need an AWS account, but don't worry, we will only be using free-tier eligible services, so it shouldn't cost you anything.
1. Set up an [Amazon Workspace VM](https://docs.aws.amazon.com/workspaces/index.html)
- There is a lot of detail here that I’m going to gloss over, but use your best judgement.
- I choose to use a Windows Server based, free-tier eligible option that I knew could run IE11 (which has a compatibility mode for IE9)
- Specifically: `Standard with Windows 10 (Server 2016 based)`
![[Workspaces Screenshot of Config.png]]
1. Access the Workspace using the Amazon Workspace client (this will be your main entry point to do testing in IE, and I’ve found it to be pretty OK on macOS and iOS)
## Set up IE for development
For security reasons, IE has a pretty high standard for what can be executed (it is an unsafe browser, after all). So we need to loosen these restrictions a little bit to allow for development.
### Disable IE redirects in Edge
Depending on the OS that you picked from Amazon Workspaces, you may find that every time that you go to open IE, Windows will force you to use Edge instead. While I certainly approve of this behavior, it is really annoying when you are explicitly trying to develop in IE, so we’ll need to disable that:
1. In file explorer, go to `C:\Program Files (x86)\Microsoft\Edge\Application\`
2. In that folder, there will be a release version folder (e.g. `112.0.1722.58`)
3. In that release folder, find a folder named `BHO`
4. Delete all files inside that `BHO` folder
### Set up IE settings
If you want to use JavaScript on localhost (which you may not need to if you use Tailscale as described below):
The `Internet Options` in IE settings need to be relaxed to allow local JS execution. Just use the screenshot below for reference:
![[Pasted image 20230313210842.png]]
## Connect to your dev server
The easiest way I found to access my development machine's server from within the virtual machine was to create an ad hoc network between the two, and Tailscale, which also has a free-tier, was the clear choice for this. You can use any other VPN service, but Tailscale stands out as the simplest setup, allowing the VPN to span my local development environment (against localhost) and the VM.
1. Using the built-in Firefox browser on the Amazon Workspace, go to the Tailscale for Windows page: https://tailscale.com/download/windows
2. Download + Install the package
3. Go to the tray, and it will prompt you to signin with a Tailscale account (or likely just Google)
- This opened in IE for me, I copied my link over to the Firefox window to not have any issues
4. Do the same steps on your personal machine
## Actually using the VM
Now that we have IE configured, and Tailscale setup on the VM and your local machine, everything should be ready! To actually use this, we’ll use the IP that Tailscale assigned your development machine. And use that IP as the host name within the IE Virtual Machine which should just work!
The URL will end up looking like: `http://100.120.199.18:8080/`
I have found that I quite like that Amazon Workspaces resumes wherever you last left off. Plus, the startup times of a cold VM are not unreasonable (resuming definitely is helpful here too).
Good luck to those who still have to develop for IE!
## References
-