Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The system cannot find the path specified" when typing a query #815

rg54 opened this issue Nov 25, 2019 · 3 comments

"The system cannot find the path specified" when typing a query #815

rg54 opened this issue Nov 25, 2019 · 3 comments


Copy link

@rg54 rg54 commented Nov 25, 2019

Steps to reproduce this issue

  1. Install HeidiSQL
  2. Connect to a MariaDB instance
  3. Go to "Query" tab and start typing query

Current behavior

After some seconds, the following message appears :
"Cannot create file "C:\Users\xxxxxxxx\Application Data\HeidiSQL\Backups\query-tab-2019-11-25_10-33-46-451.sql". The system cannot find the path specified"

this behavior is described here :

But I don't know why I cannot reproduce it on Windows 7.
Maybe it's an optional security policy which is applied by my company system administrators ? I can't check with them easily (working in a very big company, and I don't have direct contacts for that)

Expected behavior

As I understand it, HeidiSQL would normally create a folder "HeidiSQL\Backups" in "C:\Users\xxxxxxxx\AppData\Roaming" (which is the target of alias C:\Users\xxxxxxxx\Application Data")

But it can't do this, because this particular alias allow to access to a subfolder via alias, but not to list the aliased folder in himself :

  • in explorer, entering "%appdata%\Microsoft" in address bar is opening folder "C:\Users\xxxxxxxx\Application Data\Microsoft" (which is actually "C:\Users\xxxxxxxx\AppData\Roaming\Microsoft" folder)

  • the same with "%appdata%" is giving an "access denied" error

And a capture with Process Monitor when reproducing the bug in HeidiSQL confirms this

Possible solution

Instead of listing folder "C:\Users\xxxxxxxx\Application Data" to look for "HeidiSQL" folder, trying to create it directly. that seems to work with PowerShell :
New-Item -Type Directory $env:APPDATA\HeidiSQL


  • HeidiSQL version: (not tested on nightly build, because the affected server doesn't have access to Internet, so I cannot download the build from "check for updates")

  • Database system and version:
    MariaDB, but probably occurs with others RDBMS too

  • Operating system:
    Windows Server 2016
    Also tested on Windows 7, not reproduced


This comment has been minimized.

Copy link

@ansgarbecker ansgarbecker commented Dec 11, 2019

Please update to v10.3, and report back if that makes a difference. I applied some minor changes to this tab store/restore logic, so maybe we're fine here, although I guess not.


This comment has been minimized.

Copy link

@rg54 rg54 commented Dec 18, 2019

With, behavior is quite different : I have an error directly when connecting on a DB :

And I don't have one any more when I start typing in Query tab. But I still have an exception when closing the window.
and no folder "C:\Users\xxxxxxxx\Application Data\HeidiSQL" created, obviously.


This comment has been minimized.

Copy link

@ansgarbecker ansgarbecker commented Dec 18, 2019

Thanks for your report and screenshot. May I assume you were running HeidiSQL on Windows 10 there? And is there a folder C:\Users\xyz\Application Data\ on your disk?
This folder should normally be as follows on Win10: C:\Users\xyz\AppData\Roaming\
I wonder why the base folder is wrongly detected on your system.
I just pushed a change which uses the newer KNOWNFOLDERID constants for detecting that AppData\Roaming folder. Probably this helps.

*Edit: I just see you were on Windows Server 2016, and %appdata% points to C:\Users\xxxxxxxx\Application Data. So the question is how to query the C:\Users\xxxxxxxx\AppData\Roaming\ folder directly, without junction/link.

ansgarbecker added a commit that referenced this issue Dec 18, 2019
…instead of CSLID integer constants. Probably fixes wrong FOLDERID_RoamingAppData folder for #815
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.