Event for scheduler when samba starts in windows 7

AI Thread Summary
To automate the launch of a program in Windows 7 when a Samba network drive connects, users are advised to utilize the Windows Task Scheduler. While Samba is associated with Linux and the Server Message Block protocol, the integration with Windows can be complex due to Microsoft's restrictions on internal code modifications. A practical approach discussed involves starting the desired program at user login and using a VBScript to periodically check for the existence of a specific file in the Samba-shared folder. This method, although not elegant, is effective in environments where simplicity is key. The conversation also highlights that once the Samba drive is mapped (e.g., as S:\), monitoring for files behaves similarly to checking a local drive, such as C:\. The consensus leans towards initiating the file-watching program at login and verifying the drive's status before proceeding.
DrDu
Science Advisor
Messages
6,405
Reaction score
1,002
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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top