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,421
Reaction score
1,003
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.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top