Var commandStr = 'CreateObject("Wscript.Shell").Run "powershell -NoLogo -NoProfile -Command ' + psParam + '\'", 0, True' Var psParam = 'Start-Process -FilePath '+ appPath + ' -ArgumentList \'' + args + filePaths Var appPath = '\'C:\\Program Files\\Adobe\\Adobe DNG Converter\\Adobe DNG Converter.exe\'' (requires Adobe DNG Converter in default install path) Var psParam = 'Compress-Archive -LiteralPath '+ inputName +' -DestinationPath ' + archName Ĭommand Example to call the DNG Converter and convert files to DNG: Var archName = '\'C:\\Users\\test\\Desktop\\archive.zip\'' See the License for the specific language governing permissions and WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Unless required by applicable law or agreed to in writing, softwareĭistributed under the License is distributed on an "AS IS" BASIS, You may not use this file except in compliance with the License. Licensed under the Apache License, Version 2.0 (the "License") Syntax is critical, note all of the escaped characters! Writes it into a vbs file, and executes the vbs file to launch Powershell. This function takesĮither a native Powershell function or command prompt code, Template function to run command line actions in Windows This script is a sample include file for scripters that contains a The syntax can be tricky but its much more elegant and works as well as anything else on Windows- clunky but usable. I'm a Mac user and the whole ugly command window thing on Windows drives me nuts, so I have started using Windows Scripting Host and Powershell for my scripts to both bypass this (Microsoft has no taste, but I certainly do) and to tap into the features of Powershell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |