problem using ShellExecute to open folder
-
Hi all, I have faced an amazing problem. Please go through below steps to reproduce: 1. create two folders ex. new1 & new2 on D drive. 2. create one short cut of folder new1 like "Shortcut to new1" on D drive only. 3. Rename "Shortcut to new1" to "new2" 4. Execute below code
ShellExecute(GetSafeHwnd(), NULL, L"D:\\new2", L"", NULL,
SW_SHOWNORMAL);Actual Results : It opens folder new1 from D drive. Expected results : It should open folder new2 D drive.
-
Hi all, I have faced an amazing problem. Please go through below steps to reproduce: 1. create two folders ex. new1 & new2 on D drive. 2. create one short cut of folder new1 like "Shortcut to new1" on D drive only. 3. Rename "Shortcut to new1" to "new2" 4. Execute below code
ShellExecute(GetSafeHwnd(), NULL, L"D:\\new2", L"", NULL,
SW_SHOWNORMAL);Actual Results : It opens folder new1 from D drive. Expected results : It should open folder new2 D drive.
-
Howdy. It's a very simple fix. The outcome kinda makes sense too, to me. Anyhoo, just try this instead -
ShellExecute(HWND_DESKTOP, NULL, L"C:\\new2\\", L"", NULL, SW_SHOWNORMAL);
:)
Thanks for you reply...
-
Hi all, I have faced an amazing problem. Please go through below steps to reproduce: 1. create two folders ex. new1 & new2 on D drive. 2. create one short cut of folder new1 like "Shortcut to new1" on D drive only. 3. Rename "Shortcut to new1" to "new2" 4. Execute below code
ShellExecute(GetSafeHwnd(), NULL, L"D:\\new2", L"", NULL,
SW_SHOWNORMAL);Actual Results : It opens folder new1 from D drive. Expected results : It should open folder new2 D drive.
you rename shortcut name , it dose not matter. because if you change the shortcut name but it still target old one. so you want to change target then you do right click on shortcut --> select property -> change target path