5E Character Create Playlist
  1. #1

    Quickly unzip Ext, Mod, & Pak from Windows file menu

    Very annoying to have to rename and unzip extension, module, and ruleset files. So if you want an option in your Windows file menu (i.e., when you right-click on the file) to do it automatically, then you can do the following:


    Create a file named "extractFG.ps1" in C: with this for the contents:
    Code:
    $extensionFilename = [io.path]::GetFileName($args)
    $zipFile = [io.path]::GetFilenameWithoutExtension($extensionFilename) + ".zip"
    Copy-Item $extensionFilename -Destination $zipFile
    Get-ChildItem -File $zipFile | foreach {Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory($_.fullname, [io.path]::combine($_.directory, $_.basename));}
    Remove-Item $zipFile
    


    Then create a file named "regAdd.reg" with this for the contents:
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\SystemFileAssociations\.ext\shell\subtitle]
    @="Unzip FG Ext"
    
    [HKEY_CLASSES_ROOT\SystemFileAssociations\.ext\shell\subtitle\command]
    @="powershell C:\\extractFG.ps1 \"%1\""
    
    [HKEY_CLASSES_ROOT\SystemFileAssociations\.mod\shell\subtitle]
    @="Unzip FG Mod"
    
    [HKEY_CLASSES_ROOT\SystemFileAssociations\.mod\shell\subtitle\command]
    @="powershell C:\\extractFG.ps1 \"%1\""
    
    [HKEY_CLASSES_ROOT\SystemFileAssociations\.pak\shell\subtitle]
    @="Unzip FG Pak"
    
    [HKEY_CLASSES_ROOT\SystemFileAssociations\.pak\shell\subtitle\command]
    @="powershell C:\\extractFG.ps1 \"%1\""

    Double-click on the "regAdd.reg" file to have it add the required registry entries. Then you should have it in your Windows menu

    This does not delete the original file, so the Ext, Mod, or Pak file will still be there (but if you want it to be removed, just add another "Remove-Item" line to the powershell script)

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,674
    Blog Entries
    1
    Hi Valeros

    Nice. It shoudl be possible to also add some entries in teh Send To option to Send to Mod, Send to EXT, Send to PAK

    I use 7zip which recognises the files as Zip so I dont need to rename.

  3. #3
    Ampersandrew's Avatar
    Join Date
    Nov 2017
    Location
    Belfast, Northern Ireland
    Posts
    249
    Ditto, when you install 7zip it adds to the right click menu and as damned says it recognizes the files as zip without renaming them.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in