Friday, 15 July 2011

windows - Why could the behavior of batch script be inconsistent on various computers? -


I am writing a batch script to automatically push and drag on the git (for reasons I will not go here).

The script works fine on my PC, but my colleagues do not work on the computer. It goes to the part where MessageBox.exe asks what you want to do , But I get an error on his PC

  Find: Yes: Can not specify file or directory.  

The script works fine on my PC. We have only one OS, so I do not know where to start from.

I know this is a very loose question, and I'm new to scripting in Windows, but any signal would be great. / P>

Thanks! % script path% temp2.txt "Yes"! Scripts Path! Temp 2. TT & amp; (! Scriptpath! Inputbox.exe "Commit Message:" "GIT Imperative Is ticking ... "& gt; Scriptspath! Temp 2. Txt set / p commitMessage = & lt ;! Scriptpath! Temp2.txt Echo! CommentMessage! Git add.Git commit -a -m"! CommitMessage! " Git push). (Echo resonant to manually push changes!)!! Scriptpath! Temp2.txt) del% scriptPath% temp.txt echo back original directory (% cwd%) CD / D% Change in cwd% endlocal

I recommend that your partner << Strong> sign , then find is a completely different executable (Search e-file.)

I must point look obviously it % SystemRoot% \ System32 \ find.exe . This bypass saugwin if it is installed and uses Find of Windows. If Sagvin is not installed, then it is safe to use clear definitions - this is where Windows will find the executable using its normal strategy.


No comments:

Post a Comment