Event for scheduler when samba starts in windows 7

In summary, the person wants to start a program with the event scheduler in Windows 7 when a samba connection is established for a network drive. They are not familiar with Windows and need help on how to do this. They are considering launching the program at login and periodically checking for the existence of the drive. They also mention using a VBScript to check for a file in the shared samba folder. It is suggested that they read up on the Server Message Block protocol and Windows API documentation. They also discuss the possibility of waiting for a file in the C:\ drive instead of waiting for a file via samba. The person ultimately decides to start the watcher on login and check if the drive is mounted before proceeding.
  • #1
DrDu
Science Advisor
6,357
974
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
  • #2
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).
 
  • #3
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!
 
  • #4
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.
 
  • #5
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.
 

Related to Event for scheduler when samba starts in windows 7

1. What is Samba and why does it need to start in Windows 7?

Samba is an open-source software that allows for file and print sharing between Linux and Windows operating systems. It needs to start in Windows 7 in order to facilitate communication and sharing between the two systems.

2. How do I schedule Samba to start when Windows 7 boots up?

In order to schedule Samba to start when Windows 7 boots up, you can use the Task Scheduler tool. Simply create a new task, choose "When the computer starts" as the trigger, and specify the path to the Samba executable file as the action.

3. Can I customize the schedule for when Samba starts in Windows 7?

Yes, you can customize the schedule for when Samba starts in Windows 7 using the Task Scheduler tool. You can choose to start it at a specific time or on a recurring basis.

4. Is it possible to set Samba to start only when a user logs in to Windows 7?

Yes, it is possible to set Samba to start only when a user logs in to Windows 7. You can do this by creating a new task in the Task Scheduler tool and selecting "When a specific user logs on" as the trigger.

5. What should I do if Samba does not start automatically in Windows 7?

If Samba does not start automatically in Windows 7, there may be an issue with the Task Scheduler or the path to the Samba executable file may be incorrect. You can try recreating the task in the Task Scheduler or checking the path to ensure it is correct.

Similar threads

  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
2
Replies
56
Views
8K
  • Programming and Computer Science
Replies
25
Views
2K
  • Programming and Computer Science
Replies
19
Views
3K
  • Programming and Computer Science
Replies
27
Views
14K
Replies
1
Views
1K
  • Programming and Computer Science
Replies
30
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
929
Replies
3
Views
1K
Back
Top