Event for scheduler when samba starts in windows 7

Click For Summary
SUMMARY

The discussion focuses on automating program execution in Windows 7 using the Event Scheduler when a Samba connection is established for a network drive. Users suggest leveraging Windows API documentation and utilizing a VBScript to periodically check for the existence of a file in the Samba shared folder. The consensus is that while directly triggering an event on Samba connection is complex, starting a program at login to monitor the drive's status is a viable workaround. This method allows for the execution of applications based on file presence in the shared directory.

PREREQUISITES
  • Understanding of Samba and its role in network file sharing
  • Familiarity with Windows 7 Event Scheduler
  • Basic knowledge of VBScript for automation tasks
  • Access to Windows API documentation for advanced scripting
NEXT STEPS
  • Research how to configure Windows 7 Event Scheduler for automated tasks
  • Learn about Samba configuration and its integration with Windows systems
  • Explore advanced VBScript techniques for file monitoring
  • Investigate alternatives to Samba for file sharing in Windows environments
USEFUL FOR

This discussion is beneficial for system administrators, developers working with cross-platform file sharing, and anyone looking to automate tasks in Windows 7 based on network drive events.

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 1 ·
Replies
1
Views
933
  • · Replies 11 ·
Replies
11
Views
2K
Replies
14
Views
3K
Replies
3
Views
3K
  • · Replies 56 ·
2
Replies
56
Views
10K
  • · Replies 45 ·
2
Replies
45
Views
5K
  • · Replies 15 ·
Replies
15
Views
8K
Replies
4
Views
2K
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K