IF EXIST "c:\program files (x86)\Mozilla Firefox\firefox.exe" (copy "?%\Installer\override.ini" "C:\Program Files (x86)\Mozilla Firefox" /Y) ELSE (copy "?%\Installer\override.ini" "C:\Program Files\Mozilla Firefox" /Y) REM Usage: IF EXIST "Path" (Command) ELSE (Command) REM This will work for either x86 or 圆4 platform Still batch files have their limits which is why in my case I decided to rewrite my batch files as WSF files. Pic below of sample application under "details" tab.Ĭorrect the variable would be the actual path and as you know from running it manually, the copy command supports UNC paths. This will copy down whatever you placed in the Application folder to your target destination and it will work as a selectable application for the deployment tech.ĭon't worry, the quiet install command will not change the default execution policy of PowerShell on target machine. ![]() Quiet Install command: powershell.exe -ExecutionPolicy Bypass -Command "Copy-Item '?PLOYROOT%\Applications\AppName\file.key' -destination 'C:\TestDir' -recurse" ![]() \Applications\AppFolderNameĭon't forget to use -recurse switch in quiet install PowerShell command, if you are copying down a folder with contents. ![]() Quiet Install command: powershell.exe -ExecutionPolicy Bypass -Command "Copy-Item '?PLOYROOT%\Applications\AppName\file.key' -destination C:\TestDir\file.key" Try using PowerShell instead (its how I do all my scripting in applications):Ĭreate an app in MDT and import folder/files that you want to copy to target machine.
0 Comments
Leave a Reply. |