-1

I've created a program that when opened displays a message. Now I want to do this - the program must automatically get executed when a folder in my PC is opened (opened by an user).
How can I do it? The folder can be any folder of my choice.

jNerd
  • 111
  • 3
  • 11

2 Answers2

2

I don't believe you can do this natively.

However, you could possibly do it with something like AutoHotKey.

A number of possible approaches are outlined in this article. The best approach seems to be:

#Persistent
SetTimer, test, 500
return

test:
  IfWinNotActive, Create Event Log 
     return

sendinput test
winwaitclose, Create Event Log 
return
Julian Knight
  • 14,749
  • 3
  • 31
  • 46
0

You can use third party software like Folder Actions, (something like Folder Actions in Macs). But that's probably not what you want. If you want to mimic the AutoPlay function for removable drives, you can Map folder to drive letter.

tbc
  • 66
  • 6