cmd

How to escape schtasks /tr arguments

假如想象 提交于 2020-12-25 13:43:00
问题 I need to schedule a PowerShell task like following: powershell.exe -file ..\Execute\execute.ps1 And I have tried assigning it to an argument $Argument then pass it to schtasks like following: $Argument = "powershell.exe -file '..\Execute\execute.ps1'" schtasks /create /tn "SOE_Checks" /tr $Argument /sc DAILY /st 05:00 /ru "System" /rl HIGHEST /f but after running above code, nothing happened - while the task is created successfully, it appears not to run. I have also tried assigning it to

how to print black charaters ascii in batch

会有一股神秘感。 提交于 2020-12-16 04:21:19
问题 I would like to print an ascii in a batch file... I tried using this code: @echo off >%temp%\temp.txt ( echo echo ███ ▀▄ ▄ ██ ▄ ████▄ ▄ ▄ █ ▄███▄ ▄ ████▄ echo █ █ █ █ █ █ █ █ █ █ █ █ █▀ ▀ ▀▄ █ █ █ echo █ ▀ ▄ ▀█ █▄▄█ ██ █ █ █ ██ █ ██▀▀█ ██▄▄ █ ▀ █ █ echo █ ▄▀ █ █ █ █ █ █ ▀████ █ █ █ █ █ █▄ ▄▀ ▄ █ ▀████ echo ███ ▄▀ █ █ █ █ █ █ █ █ ▀███▀ █ ▀▄ echo █ █ ██ █ ██ ▀ ▀ echo ▀ ) type %temp%\temp.txt timeout 1 >nul del %temp%\temp.txt pause >nul but I get this in output: ECHO diattivato. ÔûêÔûêÔûê

how to print black charaters ascii in batch

偶尔善良 提交于 2020-12-16 04:21:12
问题 I would like to print an ascii in a batch file... I tried using this code: @echo off >%temp%\temp.txt ( echo echo ███ ▀▄ ▄ ██ ▄ ████▄ ▄ ▄ █ ▄███▄ ▄ ████▄ echo █ █ █ █ █ █ █ █ █ █ █ █ █▀ ▀ ▀▄ █ █ █ echo █ ▀ ▄ ▀█ █▄▄█ ██ █ █ █ ██ █ ██▀▀█ ██▄▄ █ ▀ █ █ echo █ ▄▀ █ █ █ █ █ █ ▀████ █ █ █ █ █ █▄ ▄▀ ▄ █ ▀████ echo ███ ▄▀ █ █ █ █ █ █ █ █ ▀███▀ █ ▀▄ echo █ █ ██ █ ██ ▀ ▀ echo ▀ ) type %temp%\temp.txt timeout 1 >nul del %temp%\temp.txt pause >nul but I get this in output: ECHO diattivato. ÔûêÔûêÔûê

Is there any way I can execute my node js and puppeteer program with an exe file?

纵饮孤独 提交于 2020-12-15 07:18:28
问题 This program works well on puppeteer when i use it on CMD. Although, it is a lengthy process and also complicated for any non-technical person. I want to make an exe file that perform the task I do manually to run this node.js file in CMD. As you can see first my program will open the browser and goto a (URL). I want to make different program with different URL. So that, if a person want to run this code, he just click the exe file and then that software will automatically do that task for

How to run command line with admin right in C# [duplicate]

巧了我就是萌 提交于 2020-12-13 07:51:44
问题 This question already has answers here : Elevating process privilege programmatically? (5 answers) Execute several elevated commands in shell (or similar) (1 answer) How to run multiple lines in cmd as administrator using C#? (2 answers) How do I make a console app always run as an administrator? (3 answers) Closed 3 years ago . I have referenced some other topics and it comes up the following coding, yet it doesn't work. I allow it creates command window and use "/k" argument keeping the

How to run EXE on VSTS Agent hosted machine

烈酒焚心 提交于 2020-12-13 05:36:42
问题 We have release pipeline in the VSTS that runs on a private server using VSTS agent. At the end of release pipeline there is a commmand line step to start executable (Nginx) file. Which succeeds but executable does not start the nginx process. I believe process dies as soon as the parent CMD or Powershell window dies. I have tried both CMD and Powershell (Start "exe" and Start-Process) to execute exe but none seem to be working. Those commands run perfectly on local computer but not when

How to run EXE on VSTS Agent hosted machine

ⅰ亾dé卋堺 提交于 2020-12-13 05:36:29
问题 We have release pipeline in the VSTS that runs on a private server using VSTS agent. At the end of release pipeline there is a commmand line step to start executable (Nginx) file. Which succeeds but executable does not start the nginx process. I believe process dies as soon as the parent CMD or Powershell window dies. I have tried both CMD and Powershell (Start "exe" and Start-Process) to execute exe but none seem to be working. Those commands run perfectly on local computer but not when

How to run EXE on VSTS Agent hosted machine

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-13 05:35:44
问题 We have release pipeline in the VSTS that runs on a private server using VSTS agent. At the end of release pipeline there is a commmand line step to start executable (Nginx) file. Which succeeds but executable does not start the nginx process. I believe process dies as soon as the parent CMD or Powershell window dies. I have tried both CMD and Powershell (Start "exe" and Start-Process) to execute exe but none seem to be working. Those commands run perfectly on local computer but not when

Python Path Directory

≯℡__Kan透↙ 提交于 2020-12-12 12:00:30
问题 I am currently working with a Windows XP Computer at my school. My question is on how to find the exact path variable to run Python in the command line. I have tried multiple directories but they all keep displaying "'python' is not recognized as an internal or external command, operable program or batch file." Is there an easy way to find this? 回答1: If the installation is ok. You can use python, opening the command prompt window and navigating to your Python installation directory (default

Detecting missing file using batch script

余生长醉 提交于 2020-12-06 15:48:29
问题 I am trying to write a batch script to detect for missing files from a list of files on Windows. Given the format of the file names to be "day_month_date_hh_mm_00_yyyy.enf", and the hours of the files will be different, I have to identify if there's a file of a particular hour is missing. I have written down the following to find out the number of days in a given year and month. set /p m="Enter month: " set /p y="Enter year: " REM call :DaysOfMonth %y% %m% setlocal DisableDelayedExpansion set