I am running an automated update command from a batch file and I am using the command line prompt for TortoiseSVN, I don't want any pop up windows to be displayed. I have tried the commmand /noui however it seems it doesn't work. Is there any way to execute an update or clean process without the UI popping up? I currently have something like this below...
TortoiseProc.exe" /command:cleanup /path:"%SOURCETrunk%" /url:"%URLTrunk%" /closeonend:3 /nodlg /noui
I just installed the Tortoise SVN command line client. It is an option on installing of the latest release of Tortoise SVN. There I can call the normal svn update command straight from the command line and no UI windows will appear.
Change to the working directory then just run the "svn update" command
Related
I am trying to install Tortoise SVN 1.9.5 silently, using a batch file.
I use msiexec instruction adding ADDLOCAL=CLI in order to do a full installation of the program and include Command Line Client Tools.
Later, I do a checkout from a specified repository to a folder in my Desktop and the problem is that I have to click OK button in order to do the checkout.
Is there any way to do a checkout automatically, without any Dialog?
The TortoiseSVN FAQ answers this
[How Can I] install TortoiseSVN silently/automatically?
Just start the MSI installer like this:
msiexec /package TortoiseSVN.msi /quiet INSTALLDIR="path/to/install/dir"
I was using 'msiexec' correctly but in order to do a silent checkout later I used svn.exe instead of TortoiseProc.exe and now the problem is solved.
svn checkout "source" "target" --quiet
Thank you,
R. Ferreiro
I wrote this .bat file:
runas /savecred /user:Domain\Username "svn checkout https://<Repository> <DestinationLocalFolder>"
To be able to automate the process of downloading source code, it has to be a . bat and it has to run as a different user than the one that is logged in. I tried it in my Windows 7 Workstation and it works perfect. But after trying it on the server, which also has TortoiseSVN, and all user settings that I checked are the same, it just opens an SVN window and immediately closes it.
I have also tried this with powershell:
powershell "runas /savecred /user:Domain\Username ""svn checkout https://<Repository> <DestinationLocalFolder>"""
Any ideas on why this does not work on the server would be greatly appreciated.
I got it, all I needed to do was running an svn cleanup, because in my debugging I had interrupted a previous checkout process. After running an svn cleanup after interrupting the process, it works perfect.
I'm try to create a batch file that will, among other things like installing the newest version of our software, first UNINSTALL the old version. I have used "wmic product get name" to find the actual name of the program, and then I have scripted the following code to uninstall the program:
wmic product where "name like 'Borland CaliberRM 10.1'" call uninstall /nointeractive >> C:\users\pbrandvold\Desktop\log.txt
When it's finished, I get this message:
Executing (\\PHIL-BRANDVOLD\ROOT\CIMV2:Win32_Product.IdentifyingNumber="{ED8B0A1F-8E90-478A-82B6-7C885A628257}",Name="Borland CaliberRM 10.1",Version="10.1.0.84")->Uninstall()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
ReturnValue = 1603;
};
I can't think of what is happening - why won't this uninstall? I've also tried using the msi, and running:
msiexec.exe /qn /x "Borland CaliberRM 10.1.msi"
Which doesn't work either.
I had this issue when trying to uninstall and reinstall Web Deploy using wmic via a batch file. It did not help running the batch file with elevated privileges.
The only way I could get it to run correctly was to open a Command Prompt window with elevated privileges and run the batch file through that.
The solution I ended up going with was to turn my batch file into an executable using a Bat to Exe converter. http://www.f2ko.de/en/b2e.php
The issue occurs due to the user's privileged of uninstalling the program.
Just open the command prompt as 'Run as administrator and run your command to uninstall the program.
Example :
open cmd with admin:
run below commands
wmic
product get name
product where name="YOUR_PROGRAM_NAME" call uninstall
I have a windows 8 jenkins slave (really more than one) and I want to have a task which clones a mirror of a git repository if it doesn't exist and always fetches latest.
I've got this 'execute windows batch' step:
if not exist "server-reference" (
git clone --mirror git#ssh.com:something/somewhere.git server-reference
)
pushd server-reference
git fetch --all
popd
exit /B %ERRORLEVEL%
The console output for the job gets to this point
c:\jenkins\workspace\thing\server-reference>git fetch --all
Fetching origin
and never finishes
If I switch an exit above the fetch then I get the expected exit.
And if I run the batch file commands as the jenkins user on the windows box everything works as expected. So I (think I) know that the git fetch --all runs on the slave without prompting for input
How do I amend this script so that it completes when Jenkins runs it?
A number of things can cause this problem. Here are things that have worked for me in the past.
I know you stated this above, but just to double-check: Confirm that when you run git fetch --all manually on the slave machine, it doesn't prompt you for a password. If it does, Jenkins would get stuck on that step, so you'll need to set up an SSH keypair.
Make sure that you are calling C:\Program Files (x86)\Git\cmd\git.exe and not C:\Program Files (x86)\Git\bin\git.exe in Jenkins. The second one can cause this problem in certain versions of git.
On the slave machine, set the environment variable HOME to C:\users\[username], filling in your user's username. (For older OS's it was C:\Documents and Settings\[username].) Then recycle the Jenkins service and try again.
Double check that in Administrative Tools > Services, the Jenkins slave service "Log On As" is set to your user and the password is correct. If not, set those values, recycle the Jenkins service and try again.
If none of the above worked, try uninstalling and reinstalling git. And if you aren't using it, try installing the newest version of git.
Currently I have a batch file that sets all the environment variables needed before starting the build process.
It's a must to use the same bat for setting the env variables.
I tried to use EnvInject Plugin, didn't have any success.
Also tried "Execute Windows batch command" before running msbuild. e.g. start mybat.bat - this didn't seem to work either
How can I integrate the same bat file to set the variables?
Each Jenkins "build step" has it's own environment, I explained this in detail in this answer: Can not change Jenkins String Parameter Variable
If you are using the MSBuild plugin, it is its own build step, so using other build steps to change the environment is futile. If you are launching MSBuild through command line using "Execute Windows batch command", then just ran your bat file within the same build step, preceding the MSBuild command
In the case of MSBuild plugin, the only proper way is to use EnvInject plugin. Maybe you should try to figure out what isn't working for you with EnvInject plugin. From the example documentation, you want to be using "At job level" configuration, to populate your whole job with the variables from your .bat file.