executing application file before syc
executing application file before syc
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
You can add "-windowstyle hidden" argument when start powershell.exe like the following:
[attachment=0]powershell_hide.png[/attachment]
[attachment=0]powershell_hide.png[/attachment]
- Attachments
-
- Hide Powershell
- powershell_hide.png (9.93 KiB) Viewed 10237 times
Re: executing application file before syc
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
Further update, unable to execute a vbs file on the Application file command line
Re: executing application file before syc
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
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
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.
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.