Page 2 of 2

Re: [UC] Problem with network locations

Posted: Thu Mar 11, 2021 12:24 am
by Krisantem
Here is the content of target.lnk when opening with Notepad :

Code: Select all

L        À      F†     ÉÂXQ¹Ö/„dÔR¹ÖÎYJÒR¹Ö                       H                    G   +                \\192.168.1.17\PARTAGE   \ \ 1 9 2 . 1 6 8 . 1 . 1 7 \ P a r t a g e 
      X
,ð!¾PCˆ°sgü–ï<»   µ »¯“;§      -   1SPSsCå
¾C­O…äi܆3˜n          ÿÿ      I   1SPS0ñ%·ïG¥ñ`Œžë¬-   
       
   1 9 2 . 1 6 8 . 1 . 1 7         -   1SPS:¤½Þ³7ƒC‘çD˜Ú)•«                        1 ÃÅ\\192.168.1.17\Partage Microsoft Network          \\192.168.1.17\Partage                                                                                                                                                                                                                                              \ \ 1 9 2 . 1 6 8 . 1 . 1 7 \ P a r t a g e                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             `      X                       ø“<ÿ<MìD‘{ucêø‘Q´Cí%ë·" Hsø“<ÿ<MìD‘{ucêø‘Q´Cí%ë·" Hs    

Re: [UC] Problem with network locations

Posted: Thu Mar 11, 2021 12:27 am
by alpha_one_x86
Content of the file:
https://imgur.com/a/RLKHgNc
I need learn how understand this...

Re: [UC] Problem with network locations

Posted: Thu Mar 11, 2021 5:01 pm
by alpha_one_x86
Ultracopier seam understand well .lnk, (into debug show as "resolv destination").
Into C:\Users\user\AppData\Roaming\Microsoft\Windows\Network Shortcuts the UI show as link but C:

Code: Select all

    WIN32_FILE_ATTRIBUTE_DATA fileInfo;
    BOOL r = GetFileAttributesExW(L"C:\\Users\\user\\AppData\\Roaming\\Microsoft\\Windows\\Network Shortcuts\\192.168.158.10", GetFileExInfoStandard, &fileInfo);
    if(r != FALSE)
    {
        return fileInfo.dwFileAttributes != INVALID_FILE_ATTRIBUTES &&
           (fileInfo.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT);
    }
    else
        return false;
And console show as dir...
I don't found any way to resolv it...

Re: [UC] Problem with network locations

Posted: Sat Mar 13, 2021 12:48 am
by Krisantem
Hi,

Maybe, you can read content on .lnk files and save it in a variable.

https://stackoverflow.com/questions/2565885/net-read-binary-contents-of-lnk-file

I don't have your development skills, but I am passionate about IT and I love IT development. I studied development in C, C ++ and Visual Basic a long time ago. I plan to do some training in web development and maybe later in application development.
So if I can help you fix this bug, I would be happy to.

Re: [UC] Problem with network locations

Posted: Sat Mar 13, 2021 11:05 am
by alpha_one_x86
Hi,

Ultracopier actually read the destination, if is lnk file read and replace by the destination by the destination of the destination of the lnk.
On the log file send (PS: the html version is very simplier to read, right click on system tray icon, save debug repport):

Destination send to Ultracopier: C:\Users\samue\AppData\Roaming\Microsoft\Windows\Network Shortcuts\Partage (PC Sabrina)
NOT C:\Users\samue\AppData\Roaming\Microsoft\Windows\Network Shortcuts\Partage (PC Sabrina)\target.lnk
And C:\Users\samue\AppData\Roaming\Microsoft\Windows\Network Shortcuts:
  • cmd/Ultracopier show Partage (PC Sabrina) is dir
  • explorer.exe show Partage (PC Sabrina) is link (but not .lnk)
Here seam be the problem...

Then:
  • Understand what kind is this special folder in windows
  • If possible visualize via cmd
  • Detect special folder in C (Win32 API)
  • Resolv special folder in C (Win32 API)
Ref: https://docs.microsoft.com/en-us/windows/win32/apiindex/windows-api-list

Cheers,

Re: [UC] Problem with network locations

Posted: Sun Mar 14, 2021 12:27 pm
by Krisantem
Hi,

I did some research on the internet and found this :
  • The constant ssfNETHOOD in this header : https://docs.microsoft.com/en-us/windows/win32/api/shldisp/ne-shldisp-shellspecialfolderconstants
  • https://www.codeproject.com/Articles/1207783/Finding-Network-Locations-Programmmatically
Maybe it can help you ...

Re: [UC] Problem with network locations

Posted: Mon Mar 15, 2021 7:04 pm
by alpha_one_x86
  • The constant ssfNETHOOD in this header : https://docs.microsoft.com/en-us/windows/win32/api/shldisp/ne-shldisp-shellspecialfolderconstants -> not, show only the fixed folder
  • https://www.codeproject.com/Articles/1207783/Finding-Network-Locations-Programmmatically -> Already see but I failed to do working it for now, the example is in C#/Net see https://docs.microsoft.com/en-us/dotnet/api/system.io.directoryinfo?view=net-5.0, I use C or C++