executing application file before syc

Welcome to BestSync Support Forum!
If you have any questions, comments, concerns, suggestion, please summit here, we'll try to reply you in short time.
Thank you!
Post Reply
tjblow
Posts: 70
Joined: Fri Mar 28, 2014 5:31 pm

executing application file before syc

Post by tjblow »

What is the proper format to execute a powershell script when running an application before synchronization. I also do not want a powershell pop-up window to appear. have tried doing powershell with -windowstyle hidden and the powershell window still appears.
RiseFly
Site Admin
Posts: 1111
Joined: Tue Nov 03, 2009 2:51 pm

Re: executing application file before syc

Post by RiseFly »

You can add "-windowstyle hidden" argument when start powershell.exe like the following:
[attachment=0]powershell_hide.png[/attachment]
Attachments
Hide Powershell
Hide Powershell
powershell_hide.png (9.93 KiB) Viewed 10238 times
tjblow
Posts: 70
Joined: Fri Mar 28, 2014 5:31 pm

Re: executing application file before syc

Post by tjblow »

The -hidden argument is what I used before and it did not give the desired results. Ending up writing a VBS wrapper script to execute powershell script from it to control powershell console window from displaying.
tjblow
Posts: 70
Joined: Fri Mar 28, 2014 5:31 pm

Re: executing application file before syc

Post by tjblow »

Further update, unable to execute a vbs file on the Application file command line
RiseFly
Site Admin
Posts: 1111
Joined: Tue Nov 03, 2009 2:51 pm

Re: executing application file before syc

Post by RiseFly »

If vbs can not be executed directly, please try the methods in the following Article:
https://technet.microsoft.com/en-us/lib ... 56587.aspx

Run the script by the script host:
1. Application:
cscript.exe
Argument:
XXX.vbs
2. Application:
wscript.exe
Argument:
XXX.vbs
tjblow
Posts: 70
Joined: Fri Mar 28, 2014 5:31 pm

Re: executing application file before syc

Post by tjblow »

The wscript.exe with a on the argument line with the vbs script and arguments worked.

so final setup:
Application file: wscript.exe
Argument: //b {script.vbs} arg1 arg2 ....
Worked, script executed and NO windows came up now.
Thanks for the input.
Post Reply