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

Symlink script returned with an error #15

Closed
comejv opened this issue Feb 8, 2024 · 15 comments
Closed

Symlink script returned with an error #15

comejv opened this issue Feb 8, 2024 · 15 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@comejv
Copy link

comejv commented Feb 8, 2024

Hello,
I was trying to find an app/script that'd let me move unused apps/folders to my HDD when I found your repo. Tried using the release 1.2.5 but when moving anything I get a "Simlink script return with an error" :
Screenshot of the error
(in the screenshot tried moving the app itself but tried with other things too)

I tried moving a folder and a file, tried moving to same drive or different drive, running as administrator. Any idea what it could be ?
Windows 11 Pro 23H2

Thanks for your help,
Côme

@arnobpl
Copy link
Owner

arnobpl commented Feb 11, 2024 via email

@arnobpl arnobpl added good first issue Good for newcomers help wanted Extra attention is needed and removed good first issue Good for newcomers labels Feb 11, 2024
@arnobpl arnobpl self-assigned this Feb 11, 2024
@arnobpl arnobpl changed the title Simlink scipt returned with an error Simlink script returned with an error Feb 11, 2024
@arnobpl arnobpl changed the title Simlink script returned with an error Symlink script returned with an error Feb 11, 2024
@arnobpl arnobpl closed this as completed Feb 17, 2024
@comejv
Copy link
Author

comejv commented Feb 19, 2024

Hey ! Sorry didn't get the notification... Thank you for your answer. The D: Drive is an NTFS drive, just like the main C: drive. The fsutil command tells me that local to local and to remote symlinks are enabled by default.

@arnobpl arnobpl reopened this Feb 19, 2024
@arnobpl
Copy link
Owner

arnobpl commented Feb 19, 2024

I have reopened the issue. I will take a look to understand what might get wrong.

@comejv
Copy link
Author

comejv commented Feb 19, 2024

Thank you ! Please tell me if you need any more info about my system or if you want me to run some tests.

@arnobpl
Copy link
Owner

arnobpl commented Feb 20, 2024

Welcome. One thing I would like to know about the exit code coming from the script. To do so:

  1. In the application, tick "Retain script file after execution".
  2. Add a source file and set a destination path. It could be anything. I just want to test why it never worked.
  3. Click "Create symlinks" button and grant admin permission.
  4. So it will fail in your system. Now go to the Symlink Creator application's path and find the script file, say SymlinkCreator_1234567890.cmd.
  5. Copy SymlinkCreator_1234567890.cmd file to Downloads folder.
  6. Right-click Start Button on Taskbar and click "Terminal (Admin)".
  7. Now copy-paste the following command (and replace SymlinkCreator_1234567890.cmd with the actual script filename) in terminal, and click "Paste anyway" button in the warning dialog and press Enter:
cd .\Downloads
.\SymlinkCreator_1234567890.cmd
echo $LASTEXITCODE

  1. Terminal will print a number at the end. Let me know what is the number. Is it just 1 or something else? Also, do you see any other error messages in the terminal?

Hope that will find something in your system. Then we can proceed further to solve the problem.

@comejv
Copy link
Author

comejv commented Feb 23, 2024

Ok that's weird, using the generated script worked...
image

But the app still doesn't. Any idea why ?

@arnobpl
Copy link
Owner

arnobpl commented Feb 23, 2024

Thank you for helping me to resolve the Symlink Creator issue. Since the generated script executed successfully, my guess is now: Symlink Creator could not run the script by itself due to file path length limit while executing the script by a wrapper script (reference).

The solution to the problem is to disable file path length limit by following this Mircrosoft article: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later

Could you follow the command (to disable file path length limit) mentioned in the Mircrosoft article and then try creating symlinks with Symlink Creator again?

Let me know the result.

Happy Symlinking!

@arnobpl
Copy link
Owner

arnobpl commented Feb 24, 2024

I have published Symlink Creator v1.2.6 that adds more error messages from caught exception. It might help to find the root cause of the issue you are facing with Symlink Creator.

Feel free to try the new version and check if more detailed error message is published from Symlink Creator, instead of the generic error message.

Happy Symlinking!

@comejv
Copy link
Author

comejv commented Feb 24, 2024

Tried, it, same non descriptive error ! But the generated script will be enough for my usage. Thank you for your answers.

@arnobpl
Copy link
Owner

arnobpl commented Feb 25, 2024

Glad to know that the generated script is working fine. But I don't know why it does not work directly with Symlink Creator itself, even no descriptive error message even after update. So the error occurred somewhere else. Anyway, I am closing this issue since there is no action item for me now.

Happy Symlinking!

@arnobpl arnobpl closed this as completed Feb 25, 2024
@maomaochong199
Copy link

maomaochong199 commented Mar 18, 2024

遇到了同样的报错,非常奇怪,当我在压缩包里直接运行程序则不会报错,解压后运行反而会报错。版本1.2.5 1.2.6 1.2.7 都存在相同问题 @comejv @arnobpl

@singularity2000
Copy link

遇到了同样的报错,非常奇怪,当我在压缩包里直接运行程序则不会报错,解压后运行反而会报错。版本1.2.5 1.2.6 1.2.7 都存在相同问题 @comejv @arnobpl

你解压后用于存放SymlinkCreator的文件夹路径里有中文,我移动到纯英文目录就解决了

@arnobpl
Copy link
Owner

arnobpl commented Sep 5, 2024

@singularity2000 I was not able to reproduce the issue with Unicode characters. I tried both Chinese and Bengali characters. Let me know how to reproduce the issue so that I can fix it. Thank you!

Happy Symlinking!

image

@arnobpl arnobpl reopened this Sep 5, 2024
@arnobpl arnobpl added the bug Something isn't working label Sep 5, 2024
@maomaochong199
Copy link

遇到了同样的报错,非常奇怪,当我在压缩包里直接运行程序则不会报错,解压后运行反而会报错。版本1.2.5 1.2.6 1.2.7 都存在相同问题 @comejv @arnobpl

你解压后用于存放SymlinkCreator的文件夹路径里有中文,我移动到纯英文目录就解决了
完全正确,路径里有中文复现报错了,纯英文路径正常

@arnobpl
Copy link
Owner

arnobpl commented Sep 12, 2024

Hello all, I was able to reproduce the issue! Thank you for the valuable feedback.

I will work on a fix and push an update.

Happy Symlinking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants