Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
Post Reply
john510
Influencer
Posts: 20
Liked: never
Joined: Jun 02, 2015 11:28 pm
Contact:

Closing CMD Window with CMD backup command

Post by john510 »

I created a bat file with the following command to start a full backup with Veeam, but cant get the CMD window to close automaticlly ?
------------------------------------
Creating Standalone Full Backups

To create a standalone full backup, use a command with the following syntax:

"C:\Program Files\Veeam\Endpoint Backup\Veeam.EndPoint.Manager.exe" /standalone

------------------
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

Hi john510,

Try to use the following

Code: Select all

//your script part//
exit
john510
Influencer
Posts: 20
Liked: never
Joined: Jun 02, 2015 11:28 pm
Contact:

Re: Closing CMD Window with CMD backup command

Post by john510 »

My script
--------------------------------------
"C:\Program Files\Veeam\Endpoint Backup\Veeam.EndPoint.Manager.exe" /standalone
exit
--------------
does not close the window
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Closing CMD Window with CMD backup command

Post by PTide » 1 person likes this post

Hi,

assume your intial batch was like

Code: Select all

some_software.exe
exit
try to change it to

Code: Select all

start some_software.exe
exit
john510
Influencer
Posts: 20
Liked: never
Joined: Jun 02, 2015 11:28 pm
Contact:

Re: Closing CMD Window with CMD backup command

Post by john510 »

I tried this below:

---------------------------------

Code: Select all

start "C:\Program Files\Veeam\Endpoint Backup\Veeam.EndPoint.Manager.exe" /standalone
exit
--------------------------------------
it opened the cmd window for second and did close it but the backup did NOT run then..
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Closing CMD Window with CMD backup command

Post by PTide »

Please try

Code: Select all

cd "C:\Program Files\Veeam\Endpoint Backup\"
start Veeam.Endpoint.Manager.exe /standalone
exit
lowlander
Service Provider
Posts: 450
Liked: 30 times
Joined: Dec 28, 2014 11:48 am
Location: The Netherlands
Contact:

[MEGRED] Start endpoint backup remotely

Post by lowlander »

Hi Can we start a Endpoint backup remotely ?

E.g. powershell

Any examples are welcome :)
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

Hi lowlander,

VEB since the latest update has two scripting options to start a backup (either incremental or standalone full backup). Check this Help Center article for more details: Performing Backup with Command Line Interface. This scrips can be wrapped up anyway you want or used to start a backup remotely.
lowlander
Service Provider
Posts: 450
Liked: 30 times
Joined: Dec 28, 2014 11:48 am
Location: The Netherlands
Contact:

Re: Closing CMD Window with CMD backup command

Post by lowlander »

Thanks !

remote execution with psexec works great.
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

You are welcome and I am glad to hear it just works™ :mrgreen:
Gostev
Chief Product Officer
Posts: 31455
Liked: 6646 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Closing CMD Window with CMD backup command

Post by Gostev »

start should do it as well (as it is designed launches the application asynchronously)...
lollolcctr
Novice
Posts: 8
Liked: never
Joined: Jan 16, 2014 8:41 am
Full Name: Torsten Rudolf
Contact:

Re: Closing CMD Window with CMD backup command

Post by lollolcctr »

I've got te same(?) problem. When I launch a backup with "Veeam.EndPoint.Manager.exe /backup" under "Start / run" (with or without Batch File makes no difference),
a black commandline window is opened as long as the backup runs. Is it possible to hide this black window?
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Closing CMD Window with CMD backup command

Post by PTide »

Hi,

Have you tried this already?

Code: Select all

cd "C:\Program Files\Veeam\Endpoint Backup\"
start Veeam.Endpoint.Manager.exe /standalone
exit
lollolcctr
Novice
Posts: 8
Liked: never
Joined: Jan 16, 2014 8:41 am
Full Name: Torsten Rudolf
Contact:

Re: Closing CMD Window with CMD backup command

Post by lollolcctr »

PTide wrote:Hi,

Have you tried this already?

Code: Select all

cd "C:\Program Files\Veeam\Endpoint Backup\"
start Veeam.Endpoint.Manager.exe /standalone
exit
Yes, i did, the behaviour is the same, only that the backup runs longer because of the full backup. The problem is not
the "starting window" but the "Veeam.Endpoint.Manager.exe window".

It looks like this:

Image

I'd really like to start it in the background as Windows Task, but the window always shows up :(
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Closing CMD Window with CMD backup command

Post by PTide »

Ok, now I see the problem. Please try placing the following code into a .bat file and start it:

Code: Select all

cd "C:\Program Files\Veeam\Endpoint Backup\"
start Veeam.Endpoint.Manager.exe /backup
TIMEOUT /T10
taskkill /IM Veeam.Endpoint.Manager.exe
exit
The things is that endpoint manager still needs a few seconds to start the job, that's why TIMEOUT is placed there.

Thank you.
lollolcctr
Novice
Posts: 8
Liked: never
Joined: Jan 16, 2014 8:41 am
Full Name: Torsten Rudolf
Contact:

Re: Closing CMD Window with CMD backup command

Post by lollolcctr »

This workaround works fine for me,thank you. Perhaps in next version the window is closed automatically? :wink:
Jan1
Influencer
Posts: 19
Liked: 2 times
Joined: Dec 29, 2014 7:15 pm
Contact:

Re: Closing CMD Window with CMD backup command

Post by Jan1 »

... and If the backup is made each hour, such windows can be annoying.
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

Hi guys,
window is closed automatically
Can you elaborate are you talking about the cmd or control panel popup? Thanks
lollolcctr
Novice
Posts: 8
Liked: never
Joined: Jan 16, 2014 8:41 am
Full Name: Torsten Rudolf
Contact:

Re: Closing CMD Window with CMD backup command

Post by lollolcctr »

Hi,

I'm talking about the control panel popup (titled "Veeam.EndpointManager.exe"), it makes no sense to me that this is left open while the backup runs (or perhaps for some debug / error mesage reasons?).
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

Now I get it (somehow missed the previous screenshot)! I’ve asked QA to check the described behavior – thanks for pushing :wink:
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

Guys,

Do not use start with Veeam.Endpoint.Manager.exe /standalone :wink:
lollolcctr
Novice
Posts: 8
Liked: never
Joined: Jan 16, 2014 8:41 am
Full Name: Torsten Rudolf
Contact:

Re: Closing CMD Window with CMD backup command

Post by lollolcctr »

Dima P. wrote:Guys,

Do not use start with Veeam.Endpoint.Manager.exe /standalone :wink:
It really makes no difference at all, whether it's used in a batch file with or without "start" or is directly started from the cmd-window with parameter "/backup" or "/standalone", the window always remains open. (longer of course, while fullbackup :D)
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

Start can pop up a new command prompt (like you posted before)

When using it without start – you can use exit to close the only one cmd window.
lollolcctr
Novice
Posts: 8
Liked: never
Joined: Jan 16, 2014 8:41 am
Full Name: Torsten Rudolf
Contact:

Re: Closing CMD Window with CMD backup command

Post by lollolcctr »

Here's another Screenshot to explain. The unwanted window is produced by Veeam.Endpoint.Manager.exe, not cmd. It stays as long as the backup takes or is closed/killed by someone (backup itself keeps on running, then). I only tried with start as PTide recommended to close the cmd window after killing Veeam.Endpoint.Manager.exe.

Image
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

Thanks – I’ll let dev team know about your approach.
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. » 1 person likes this post

Since this thread is still referred to, please use "C:\Program Files\Veeam\Endpoint Backup\Veeam.EndPoint.Manager.exe" /backup without start command in the beginning and command prompt will be closed on completion. Thanks.
Jan1
Influencer
Posts: 19
Liked: 2 times
Joined: Dec 29, 2014 7:15 pm
Contact:

Re: Closing CMD Window with CMD backup command

Post by Jan1 »

Is it possible to start backup without this window ?
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

So you want to hide the command prompt window during the script execution even though it will be closed on completion?
Jan1
Influencer
Posts: 19
Liked: 2 times
Joined: Dec 29, 2014 7:15 pm
Contact:

Re: Closing CMD Window with CMD backup command

Post by Jan1 »

Exactly. I use Task Scheduler in Windows which is very flexible. I wan to do "invisible" backup for users like in GUI.

Thanks
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Closing CMD Window with CMD backup command

Post by Dima P. »

Got it and it sounds valid. I'll let the team know. Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests