Skip to content

Instantly share code, notes, and snippets.

@vaginessa
Forked from milolav/Portable_WhatsApp.md
Created April 24, 2017 18:28
Show Gist options
  • Select an option

  • Save vaginessa/aaf094e67df2312606eec152586d65b1 to your computer and use it in GitHub Desktop.

Select an option

Save vaginessa/aaf094e67df2312606eec152586d65b1 to your computer and use it in GitHub Desktop.
Making WhatsApp desktop application portable

Portable desktop WhatsApp

This tutorial will explain how to make WhatsApp desktop application portable on Windows platform. Maybe this can work for other platforms as well.

For this to work NodeJs and asar package are required.

Download WhatsApp package

Firstly download latest version of WhatsApp. The following link contains all Windows (x64) releases:

https://web.whatsapp.com/desktop/windows/release/x64/RELEASES

Find the release with the highest number that has full suffix. For example WhatsApp-0.2.2478-full.nupkg

The download link would be:

https://web.whatsapp.com/desktop/windows/release/x64/WhatsApp-0.2.2478-full.nupkg

Once downloaded unpack it (it's standard zip file), and go to the \lib\net45 folder. This folder contains the actual application. Copy the contents of that folder to your portable destination. For this example E:\WhatsAppPortable.

Within that folder delete the squirrel.exe to disable automatic updates.

Download NodeJs and install asar

If Node and asar are already installed, this step can be skipped.

Go to https://nodejs.org/download/release/latest/ and download version that ends with -win-x64.7z.

Unpack that archive to E:\node for example. Open cmd.exe, go to Node's folder and install asar.

C:\>cd /d E:\node
E:\node>npm install asar

Make WhatsApp portable

While at cmd unpack electron.asar package from E:\WhatsAppPortable\resources\ folder using asar's extract archive

asar extract E:\WhatsAppPortable\resources\electron.asar E:\WhatsAppPortable\resources\electron_extract

Now go to E:\WhatsAppPortable\resources\electron_extract\browser\ and edit the init.js file using any text editor.

Find the following lines:

app.setPath('userData', path.join(app.getPath('appData'), app.getName()))
app.setPath('userCache', path.join(app.getPath('cache'), app.getName()))

Replace them with:

var appProfileDir = "Profile"
for (let arg of process.argv) {
  if (arg.indexOf('--profile-dir=') === 0) {
    appProfileDir = arg.substr(arg.indexOf('=') + 1)
  }
}
var profilePath = path.join(path.dirname(process.execPath), appProfileDir)
app.setPath('userData', profilePath)
app.setPath('userCache', profilePath)

Save the file and pack it with asar:

asar pack E:\WhatsAppPortable\resources\electron_extract E:\WhatsAppPortable\resources\electron.asar

The electron_extract folder in E:\WhatsAppPortable\resources\ can be deleted now.

Running the portable version

In the previous step the --profile-dir switch is added and Profile is set as default folder. If the WhatsApp is started without the switch it will create and use Profile folder.

If it is started like this:

WhatsApp.exe --profile-dir=MySecondNumber

it will create MySecondNumber folder ad use it as a profile folder.

This provides the ability to run multiple instances of WhatsApp with different profiles on the same computer.

Final thoughts

Adding something like this profile-dir switch can probably be used to make any Electron application portable as long it is not using appData path elsewhere the code.

@alexrajpoot

Copy link
Copy Markdown

Great guide—really helpful and easy to follow 👍 I like how you explained the portable setup step by step, especially the profile-dir trick for running multiple accounts. It’s a smart workaround for users who want more flexibility without installing the app.

For people who need extra privacy and customization features, tools like FM WhatsApp can also be useful alongside setups like this, as they offer more control over messaging and security options. Overall, solid tutorial—saved it for future use!

@alexrajpoot

Copy link
Copy Markdown

GB WhatsApp Pro APK recent update has introduced GB WhatsApp pro for desktop or PC use. Now all amazing features can also be used on Windows. The process is simple and straightforward.

@adahfriedman

Copy link
Copy Markdown

GB WhatsApp old versions remain popular because they offer advanced customization, privacy controls, and extra messaging features that many users still prefer. Especially after testing different releases, versions like gb whatsapp old version 6.85 download and GB WhatsApp Old Version 17.30 APK stand out for their smooth performance and useful features.

  1. Custom themes and interface options
    These versions provide extensive customization, including themes, fonts, icons, and chat styles.

  2. Better privacy controls
    Users can hide online status, blue ticks, typing indicators, and even view deleted messages.

  3. Smooth performance on older devices
    GB WhatsApp old version 6.85 download is often preferred for its lightweight performance on low-end Android phones.

  4. Advanced messaging features
    Features like auto-reply, message scheduling, and anti-delete messages make communication more flexible.

  5. Larger media sharing support
    Users can send bigger videos, high-quality images, and larger files without heavy compression.

  6. Dual WhatsApp account support
    Both versions allow users to manage multiple WhatsApp accounts on the same device.

  7. Stable and user-friendly experience
    Many users find gb whatsapp old version 17.30 apk download stable, fast, and easy to use compared to some newer releases.

@alexrajpoot

Copy link
Copy Markdown

Great tutorial. The profile-dir method for running multiple WhatsApp instances is especially useful for users who manage separate accounts on the same PC.

For those interested in additional customization features, privacy controls, and recent updates, whatsapp gb atualizado can be a helpful resource to explore. Thanks for sharing this portable setup guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment