diff --git a/gajim/common/configpaths.py b/gajim/common/configpaths.py
index 20a37946a3f6728d15fc6ce20a3b9125ff50e7bd..0ac87931436a9a057c782d68c1d23206a56c2f8c 100644
--- a/gajim/common/configpaths.py
+++ b/gajim/common/configpaths.py
@@ -105,13 +105,14 @@ def __init__(self) -> None:
         self.custom_config_root = None  # type: Optional[Path]
 
         if os.name == 'nt':
-            try:
+            if gajim.IS_PORTABLE:
+                application_path = Path(sys.executable).parent
+                self.config_root = self.cache_root = self.data_root = \
+                        application_path.parent / 'UserData'
+            else:
                 # Documents and Settings\[User Name]\Application Data\Gajim
                 self.config_root = self.cache_root = self.data_root = \
                         Path(os.environ['appdata']) / 'Gajim'
-            except KeyError:
-                # win9x, in cwd
-                self.config_root = self.cache_root = self.data_root = Path('.')
         else:
             self.config_root = Path(GLib.get_user_config_dir()) / 'gajim'
             self.cache_root = Path(GLib.get_user_cache_dir()) / 'gajim'
diff --git a/win/misc/gajim-portable.nsi b/win/misc/gajim-portable.nsi
index 86d05c0aa2cf62b6f619cc968d358b83aaf9e935..e16592c3981f09244313df9405d5e36743ecb5a0 100644
--- a/win/misc/gajim-portable.nsi
+++ b/win/misc/gajim-portable.nsi
@@ -105,9 +105,9 @@ Section "Gajim" SecGajim
 
     SetOutPath "$INSTDIR\bin"
     CreateShortCut "$INSTDIR\Gajim-Portable.lnk" "$INSTDIR\bin\Gajim.exe" \
-    "-c ..\UserData" "" "" SW_SHOWNORMAL "" "Gajim Portable"
+    "" "" "" SW_SHOWNORMAL "" "Gajim Portable"
     CreateShortCut "$INSTDIR\Gajim-Portable-Debug.lnk" "$INSTDIR\bin\Gajim-Debug.exe" \
-    "-c ..\UserData" "" "" SW_SHOWNORMAL "" "Gajim Portable Debug"
+    "" "" "" SW_SHOWNORMAL "" "Gajim Portable Debug"
     FileOpen $0 "is_portable" w
     FileClose $0