OpenWithUnity.inf

copied this to make an open with unity menu
http://www.hanselman.com/blog/IntroducingPowerShellPromptHere.aspx
3509408--280127--OpenWithUnity.png

  1. put text into a .inf file and right click on it and select install
  2. can uninstall from control pannel → programs
[version]
signature="$CHICAGO$"

[OpenWithUnityInstall]
CopyFiles = OpenWithUnity.Files.Inf
AddReg    = OpenWithUnity.Reg

[DefaultInstall]
CopyFiles = OpenWithUnity.Files.Inf
AddReg    = OpenWithUnity.Reg

[DefaultUnInstall]
DelFiles  = OpenWithUnity.Files.Inf
DelReg    = OpenWithUnity.Reg

[SourceDisksNames]
55="Open with Unity","",1

[SourceDisksFiles]
OpenWithUnity.INF=55

[DestinationDirs]
OpenWithUnity.Files.Inf = 17

[OpenWithUnity.Files.Inf]
OpenWithUnity.INF

[OpenWithUnity.Reg]
HKLM,%OWU%,DisplayName,,"%OpenWithUnityName%"
HKLM,%OWU%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\OpenWithUnity.inf"
HKCR,Directory\Shell\OpenWithUnity,,,"%OpenWithUnityAccel%"
HKCR,Directory\Shell\OpenWithUnity\command,,,"""C:\Program Files\Unity\Editor\Unity.exe"" -projectPath ""%1"""
HKCR,Directory\Shell\OpenWithUnity,Icon,,"C:\Program Files\Unity\Editor\Unity.exe"

[Strings]
OpenWithUnityName="OpenWithUnity PowerToy"
OpenWithUnityAccel="Open with &Unity"
OWU="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenWithUnity"
3 Likes

Where does this add the context menu? Folders?

yes ‘Directory’ as registry calls it

very handy, works well, thanks! Opening projects like this, however, allows me to have multiple unity projects open at the same time. I wonder what the consequences of that might be.

thanks. opening multiple projects was already possible, this just makes it easier

Thanks for this.