## BUG: error code compilng from network path

Report problems with documented functionality
Tomer
Posts: 340
Joined: 21 Aug 2016, 05:11

### BUG: error code compilng from network path

Hey,

The following error started appearing from the version "1.1.33.02 - July 17, 2020" or maybe earlier

when compilng a script from a network path uses #include,
(sample of network path: \\servername\shardfolder)

then the following error code showing up (see attachment img)

what i do to solve this ?

i copy the files to a local drive and then i make the compile,
its works but its very annoying since all my scripts located in the network

* or i use version 1.1.32.00 - November 24, 2019,
in this ver, i can compile my scripts from a network path as well

Attachments
123.png (22.61 KiB) Viewed 205 times
Last edited by Tomer on 14 May 2021, 05:17, edited 1 time in total.

TAC109
Posts: 690
Joined: 02 Oct 2013, 19:41
Location: New Zealand

### Re: BUG: error code compilng from network path

@lexikos This error is being returned from AutoHotkey when called with the /ilib parameter from Ahk2Exe.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility

Tomer
Posts: 340
Joined: 21 Aug 2016, 05:11

### Re: BUG: error code compilng from network path

Any Reference

lexikos
Posts: 7511
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

### Re: BUG: error code compilng from network path

AutoHotkey.exe can't find the file because it doesn't exist in the working directory. Ahk2Exe uses cmd.exe to redirect the output to a text file, and cmd.exe does not support UNC paths for the working directory.

This can be solved by using some other method of capturing stdout/stderr. WScript.Shell is the easiest/shortest way, but it doesn't support Unicode. For that we can call CreateProcess and pass it stdin/stderr handles of our own. There are a few versions of "StdOutToVar" and some other scripts that do this.

Users can work around it by using mapped network drives (i.e. use a drive letter mapped to a network location instead of the direct UNC path).

This shouldn't be an issue with AutoHotkey v2 because #include is relative to the current file's directory by default, not the original working directory.

Tomer
Posts: 340
Joined: 21 Aug 2016, 05:11