logo elektroda
logo elektroda
X
logo elektroda

[Solved] Windows 10 Pro 64bit - Issues with Milesight VMS Lite Autostart, Task Scheduler & Batch File

mlassota 12267 16
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17113752
    mlassota
    Level 18  
    Hello

    I am asking my colleagues for help in the following matter

    Windows 10 Pro 64 bit used as a home FTP, DLNA server and camera recorder. I have a problem with the latter. As VMS software I use Milesight VMS Lite
    The program easily runs "from the desktop", works and does not create any problems.
    However, I can't make it start automatically when Windows starts
    I tried the Task Scheduler, adding both common and user to the autostart to check the options in the program (there is one)
    Program permissions set to maximum - full access
    Creating a batch file also gives no result - The program does not start from the bat file.
    There is a strange situation when you try to start using Task Scheduler
    The task is created correctly but when you try to edit it, an error message pops up "There was an error regarding the task. The message is error: At least one of the specified arguments is not valid.

    I have already exhausted all my ideas so I am asking you for help in making this autostart ...
  • ADVERTISEMENT
  • #2 17113800
    perzan
    Level 12  
    Can you put the contents of the "Target" field from the properties of the shortcut on your desktop?
    This can tell us something.
    P.
  • ADVERTISEMENT
  • #3 17113809
    mlassota
    Level 18  
    Of course

    "C: \ Program Files (x86) \ Milesight VMS Lite \ Milesight VMS Lite.exe"

    Unfortunately, I can't upload the screen - at the moment I have access only through VNC and there is no such option :(
  • #4 17113975
    Matuzalem
    Level 43  
    Yes, "I think out loud" or wouldn't it be possible and using Windows 10 to run the program as a service using sc.exe * - https://support.microsoft.com/pl-pl/help/251192/how-to-create- windows-a-service-by-using-sc-exe
    A solution as old as the tool, but it may work. Of course, on the condition that the program itself can be pressed into such a framework.

    * https://www.microsoft.com/en-us/download/details.aspx?id=17657
  • ADVERTISEMENT
  • Helpful post
    #5 17114026
    perzan
    Level 12  
    The first thing that catches the eye is the spaces in the directory and file names.
    If you want to use it in a batch file, it must be rewritten with quotation marks.
    In the properties of the new shortcuts you must also specify "Start in:" identically as in the original shortcut.
    Similarly, if you create a task in the schedule, in particular with a batch file, you must fill in the "Start in" field, otherwise it will invoke the program being in the% WINDIR% \ System32 or% USERPROFILE% directory if you release it in the schedule on your account.
    Have you looked at the "Compatibility" tab or something is not turned on there?
    But above all, quotation marks are the most common windows ill.

    Methuselah: not every program will walk as a service.
    P.
  • #6 17114223
    Matuzalem
    Level 43  
    perzan wrote:

    Methuselah: not every program will walk as a service.


    Hence in his previous post, among others and this:
    Matuzalem wrote:
    Of course, on the condition that the program itself can be pressed into such a framework.
    I put the sentence (hoping that this is a clear enough indication of the restriction you wrote about), but you could not see that.
  • #7 17114663
    mlassota
    Level 18  
    Hello
    In fact, the quotation marks caused the batch file to run the application
    I placed it in the autostart directory - the bat file itself must be placed - placing a shortcut to it does not give the desired effect

    After restart, the program started automatically
    There remains a slight inconvenience in the form of a running console window ... but that's ... a tiny problem - it can even be so unless you have an idea

    greetings
  • ADVERTISEMENT
  • #8 17114745
    clubs
    Level 38  
    mlassota wrote:
    There remains a slight inconvenience in the form of a running console window ... but that's ... a tiny problem - it can even be so unless you have an idea

    Write an exit for this whip
  • #9 17114783
    mlassota
    Level 18  
    Wish it were that simple...
    I started my adventure with DOS 5.0 ...
    Exit will be effective but only after the application is finished in the line above ...
    And then it will actually close the console
  • Helpful post
    #10 17114826
    perzan
    Level 12  
    Type in the .bat file like this:
    START "C: \ Program Files (x86) \ Milesight VMS Lite \ Milesight VMS Lite.exe"
    And to make it look better, write something like this:

    @Echo. OFF
    C:
    CD \
    CD "Program Files (x86) \ Milesight VMS Lite"
    START "C: \ Program Files (x86) \ Milesight VMS Lite \ Milesight VMS Lite.exe"
    EXIT

    The console window should disappear and the program work.
    This extended version should also work if you make a shortcut in the autostart instead of loading a file there.
    Good luck.
    P.
  • #11 17114828
    clubs
    Level 38  
    mlassota wrote:
    Exit will be effective but only after the application is finished in the line above

    If you do not use start / w it will close the console after "opening" the program
  • #12 17114942
    mlassota
    Level 18  
    Unfortunately, adding START before the execution line causes that the line does not run - the program does not start and the console does not close. Only a clean execution line runs the program

    Maybe there is something dug up in W10 ...
  • Helpful post
    #13 17114970
    clubs
    Level 38  
    mlassota wrote:
    Unfortunately, adding START before the execution line causes the line not to be executed


    So this whip doesn't start your program?

    Code: Dos
    Log in, to see the code
  • Helpful post
    #14 17115325
    perzan
    Level 12  
    clubs: Good, with an empty window name starts, I don't want to. Nature curiosity, what's the name of the window to run the program? :(
    What's better, if I start the program without a space in the name of the directory by starting it, it starts without an empty window name, and if there are spaces in the exeka name itself, it won't start, although the exeka name is in quotation marks. Hmmm ... be smart here on MS. :(

    mlassota: The console you are left with is not the one from which the program is called, but a new one that opens instead of the program. In Win7 I have the same effect.
    The clubs code should work. They only need to be these two quotation marks before the file path.
    P.
  • #15 17116465
    mlassota
    Level 18  
    welcome back

    Strange things are happening with this batch file

    It is removed from the autostart directory - both shared and user-defined
    My guess is that some anti-virus crashes it or windows itself. Avast doesn't really do that because I have added the entire directory to exclude
    If there is no start "" only the execution line itself - everything is ok, it doesn't disappear from the autostart, it starts up leaving the console as if from the desktop it fires with the start, it works beautifully when I throw it into the autostart - it disappears
    And get here be smart :)

    Thank you all for great help !!!
  • #16 17116666
    clubs
    Level 38  
    Hello
    Then add this whip to the register under "run"
  • #17 17116737
    mlassota
    Level 18  
    Creating a batch file satisfactorily (though, as I wrote earlier, not quite perfect) solved the problem
    thank you all

Topic summary

The discussion revolves around issues with autostarting Milesight VMS Lite on Windows 10 Pro 64-bit. The user initially faced challenges in getting the software to launch automatically at startup, despite it functioning correctly when started manually. Various solutions were proposed, including using Task Scheduler, creating batch files, and running the program as a service. Key points included the importance of using quotation marks in file paths, ensuring the "Start in" field is correctly set, and potential conflicts with antivirus software. Ultimately, the user found success by placing the batch file directly in the autostart directory, although a console window remained open during execution. Further suggestions included adding the program to the Windows registry under "run" for a cleaner startup experience.
Summary generated by the language model.
ADVERTISEMENT