Page 1 of 1

executing application file before syc

Posted: Thu Sep 17, 2015 2:07 pm
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.

Re: executing application file before syc

Posted: Mon Sep 21, 2015 9:19 am
by RiseFly
You can add "-windowstyle hidden" argument when start powershell.exe like the following:
[attachment=0]powershell_hide.png[/attachment]

Re: executing application file before syc

Posted: Wed Sep 30, 2015 8:19 pm
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.

Re: executing application file before syc

Posted: Wed Oct 07, 2015 8:02 pm
by tjblow
Further update, unable to execute a vbs file on the Application file command line

Re: executing application file before syc

Posted: Thu Oct 08, 2015 12:30 pm
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

Re: executing application file before syc

Posted: Fri Oct 16, 2015 4:05 pm
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.