Search Unity

OpenWithUnity.inf

Discussion in 'Editor & General Support' started by rakkarage, May 12, 2015.

  1. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
    copied this to make an open with unity menu
    http://www.hanselman.com/blog/IntroducingPowerShellPromptHere.aspx
    OpenWithUnity.png
    1. put text into a .inf file and right click on it and select install
    2. can uninstall from control pannel -> programs
    Code (CSharp):
    1. [version]
    2. signature="$CHICAGO$"
    3.  
    4. [OpenWithUnityInstall]
    5. CopyFiles = OpenWithUnity.Files.Inf
    6. AddReg    = OpenWithUnity.Reg
    7.  
    8. [DefaultInstall]
    9. CopyFiles = OpenWithUnity.Files.Inf
    10. AddReg    = OpenWithUnity.Reg
    11.  
    12. [DefaultUnInstall]
    13. DelFiles  = OpenWithUnity.Files.Inf
    14. DelReg    = OpenWithUnity.Reg
    15.  
    16. [SourceDisksNames]
    17. 55="Open with Unity","",1
    18.  
    19. [SourceDisksFiles]
    20. OpenWithUnity.INF=55
    21.  
    22. [DestinationDirs]
    23. OpenWithUnity.Files.Inf = 17
    24.  
    25. [OpenWithUnity.Files.Inf]
    26. OpenWithUnity.INF
    27.  
    28. [OpenWithUnity.Reg]
    29. HKLM,%OWU%,DisplayName,,"%OpenWithUnityName%"
    30. HKLM,%OWU%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\OpenWithUnity.inf"
    31. HKCR,Directory\Shell\OpenWithUnity,,,"%OpenWithUnityAccel%"
    32. HKCR,Directory\Shell\OpenWithUnity\command,,,"""C:\Program Files\Unity\Editor\Unity.exe"" -projectPath ""%1"""
    33. HKCR,Directory\Shell\OpenWithUnity,Icon,,"C:\Program Files\Unity\Editor\Unity.exe"
    34.  
    35. [Strings]
    36. OpenWithUnityName="OpenWithUnity PowerToy"
    37. OpenWithUnityAccel="Open with &Unity"
    38. OWU="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenWithUnity"
     
    Last edited: May 20, 2015
  2. rlenders

    rlenders

    Joined:
    Aug 19, 2013
    Posts:
    3
    Where does this add the context menu? Folders?
     
  3. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
    yes 'Directory' as registry calls it
     
  4. mtusan

    mtusan

    Joined:
    May 24, 2013
    Posts:
    4
    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.
     
  5. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
  6. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    Thanks for this.