I post a new question since my last post lacks details.

I am running Windows 10 Professional on my PC. I created a custom windows application on Visual Studio 2017. I need Windows to open up a certain local folder on my PC (folder located on C: drive) whenever I click on Desktop shortcut to run the application. I'm not sure if I need to do this on my codes or I can just directly create a setting on Windows instead to auto open up the folder.

I found online that a user can make a folder/software to auto open during Windows boot up. Is there any way that I can make a folder to auto open when I run my custom application/software on my PC instead?

1 Answer 1


There is no concept of Windows opening a folder, during boot nor at any other time.

What you can do is opening a folder in File Explorer, a part of the Windows UI shell.

You can do that by starting

 explorer.exe "C:\Program Files\Windows Defender"

this would open a new Windows with the directory you have specified.

If you want to open a folder in File Explorer alongside with your app, create a cmd batch file with content similar to this:

C:\Program Files\Windows Media Player\wmplayer.exe
explorer.exe "C:\Program Files\Windows Defender"

the first line would be your program.

  • thank you. This would be a great help for me. However, it would be great if u can guide me more on creating the cmd batch file. Just to clarify, from the batch file I am able to open up a folder whenever I run my program correct? Aug 9, 2020 at 15:37
  • I figured this one out. I need to navigate to the correct path first before actually execute the command above. Thank you for your help! Aug 10, 2020 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.