Event for scheduler when samba starts in windows 7

Click For Summary

Discussion Overview

The discussion revolves around how to trigger a program using the Windows 7 event scheduler when a Samba connection is established for a network drive. Participants explore various approaches to monitor file creation in a shared Samba folder and consider alternatives for detecting file changes.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks guidance on using the Windows event scheduler to start a program when a Samba connection is made, expressing a lack of familiarity with Windows.
  • Another participant provides background on Samba and suggests consulting Windows API documentation, indicating that the desired task may be complex due to Microsoft's restrictions.
  • A participant proposes an alternative approach of launching a program at login that periodically checks for the existence of a file in the Samba shared folder, acknowledging the lack of elegance in this solution.
  • One participant questions the difference in approach if the file were located on the local C:\ drive instead of the Samba drive, suggesting that the method of monitoring may not change significantly.
  • The original poster reflects on the idea of starting the file-watching program upon Samba connection establishment but ultimately considers starting it at login and checking if the drive is mounted first.

Areas of Agreement / Disagreement

Participants express differing views on the best method to achieve the desired outcome, with no consensus reached on a definitive solution. The discussion remains open to various approaches and considerations.

Contextual Notes

Participants acknowledge limitations in their understanding of Windows internals and the complexity of interacting with the event scheduler and Samba connections. There are unresolved assumptions regarding the feasibility of different approaches.

DrDu
Science Advisor
Messages
6,423
Reaction score
1,004
I want to start a program with the event sheduler in windows 7 when samba establishes a connection for a network drive. I am not a windows guy. How do I do this?
 
Technology news on Phys.org
DrDu said:
I want to start a program with the event sheduler in windows 7 when samba establishes a connection for a network drive. I am not a windows guy. How do I do this?
Samba is a Linux thing - it is a pun on the Server Message Block protocol used by earlier versions of Windows. I suggest you read up on https://en.wikipedia.org/wiki/Server_Message_Block and then get hold of some Windows API documentation. I suspect what you want to do is not easy (Microsoft do not want anybody to mess around with their code internals).
 
Ok, I see. I think I will launch my program simply at login and check periodically for the existence of the drive. What I really want to do is to start some windows application once a linux application wrote the input for this application on the shared samba folder. I do this with a simple vbscript which checks periodically for the existence of the file. Not elegant, but in the environment I am forced to work, nothing is elegant anyhow.

Thank you very much for your help!
 
Hhhhmmm...drive? file?

Say, how would you do things differently if instead of waiting for a file via samba, all you had to do is wait for a file in the C:\ drive?. Once the samba drive is mapped onto Windows to, say the S:\ drive, things shouldn't be any different.
 
You are right, there is no difference. But my first idea was to start the program which watches for a file each time that the samba connection for the drive is established. Now I think I will start the watcher on login and test first whether the drive is mounted.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
14
Views
4K
Replies
3
Views
3K
  • · Replies 56 ·
2
Replies
56
Views
10K
  • · Replies 45 ·
2
Replies
45
Views
6K
  • · Replies 15 ·
Replies
15
Views
8K
Replies
4
Views
2K
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K