'sc' is not recognized as an internal or external command - svnserve

I am trying to create a svnserver using cmd after i changed svnserve.conf by uncommenting the following lines in the file,
anon-access = read
auth-access = write
command execute in cmd is,
sc create svnserver binpath= "C:\Program Files\TortoiseSVN\bin\svnserve.exe --service -r c:\Goods\Repo" DisplayName= "Subversion" depend= tcpip start= auto
but i am getting error
'sc' is not recognized as an internal or external command
I am not sure what i am doing wrong. I have installed tortoise SVN Client and Visual SVN Server.
Can someone please let me know what i am missing here.

you will need to add the path to sc.exe ("c:\windows\system32\") in your Path environment variable. Do this by hitting windows key + Pause|Break then selecting advanced system settings - environment variables is at the bottom. Just add an extra entry after the last - separated by semi-colons. If this isn't possible, simply give the command the full path of sc.exe e.g.
"c:\windows\system32\sc.exe" create svnserver....

Related

Mechanics of csh and source command in CentOS7

I am trying to do this on CentOS-7. So why will this not work when I use the command 'source filename' where filename is the following file under another name:
!/usr/bin/csh
## setting aliases for IC tool installation path
## setenv CDSHOME /path/to/cadence/installs/ICADVM181
##The following line is from the InstallScape instructions
##setenv CDSHOME /home/administrator/cadence/installs/IC618/
##If you are using the C shell, use the following command:
##setenv PATH $PATH:installation_path/vacpp/bg/12.1/bin/
##setenv CDSHOME $PATH:home/administrator/cadence/installs/IC618/
setenv CDSHOME "/home/administrator/cadence/installs/IC618/"
## Below setting is for license server, serverA and serverB are hostnames of the license server machines, and 5280 and 5281 are ports
#setenv CDS_LIC_FILE 5280#serverA:5281#serverB
## setting path in your environment
set path = ($CDSHOME/tools/bin $CDSHOME/tools/dfII/bin $path)
If I go to terminal, engage 'csh', then use 'source filename', I can then use the 'which virtuoso' to make sure that the path can be found to virtuoso. This works.
I know some basic things about Linux, bash, and csh from reading and various videos. I don't see what I'm missing here. Everything I read says you should be able to engage csh, bash, or sh with a shebang line at the beginning of a file.
My long term goal is have this string of commands load upon logging into a number of workstations or activated by double clicking a desktop icon.
This is for the Cadence software package, so I will have to do something similar depending upon what is installed. I'm not ready to worry about the licensing server issue, but that's next after being able to run 'virtuoso' executable.

Obtain msiexec command line at install custom action (vs setup project)

I'm wondering if there is an option to obtain msiexec command line at "install" custom action (we use vs2008 "setup project" for the installer).
We know that we can access "CustomActionData" parameters but if we run the following command:
msiexec /i demo.msi /quiet user=test log=true
we know how to access "CustomActionData" parameters (user=test log=true), but we don't know how to access whole msiexec command line parameters (including "/i /quiet")...
Is it even possible because in Process Monitor we can see that at install action, this msiexec process (running as SYSTEM) is run with command the following command:
C:\Windows\system32\MsiExec.exe -Embedding 3E439F7DA7DE174205150FEBCEB7B14F E Global\MSI0000
So, is it possible to obtain "msiexec" command line parameters inside the installer (c++) code?

Visual Studio cross platform makefile project, command not found

I'm trying to build a cross platform project for Ubuntu. In my makefile I have the line
"PSPSDK=$(shell psp-config --pspsdk-path)"
which gives the error "psp-config: Command not found."
psp-config is in my path and running make from the Ubuntu system on the files that get copied over from Visual Studio works fine. It also works if I manually ssh into the Ubuntu system from windows and run the command from there.
Why can't it find the command when run through Visual Studio?
You should update PATH at the beginning of "~/.bashrc" file (and not at the end) because it starts with somethign like:
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
Also, if you add code before these lines, it will be invoked for every subshell execution, so it is better to add a guard for it as well so it is invoked only once per session:
if [ -z $HOME_OPT_PATH_SET ]; then
export PATH=$PATH:$HOME/opt
export HOME_OPT_PATH_SET=1
fi
# If not running interactively, don't do anything
...

'cmake' is not recognised as an internal or external command - Polaris

My clone project path from github "C:\Users\Addy\Documents\polaris\"
I have created build directory "C:\Users\Addy\Documents\polaris\build"
From cmd.exe I access build directory path "C:\Users\Addy\Documents\polaris\build"
And run this command
"cmake -G "Visual Studio 10 Win64" -DCMAKE_CONFIGURATION_TYPES=Release;Debug .."
I am running this command on windows7 cmd. But it gives me the error.
**'cmake' is not recognised as an internal or external command**
As per the steps given in the
website(https://github.com/anl-polaris/polaris/wiki/Getting-Started)
It sounds like you don't have cmake in your path variables. Simple test, type 'echo %PATH%' in the command prompt, this will list all paths your OS will look for the executable in. If you can't see a path to your cmake executable then you need to add it.
Control Panel >> System >> Advanced System settings (left side on windows 10), too bring up the 'System Properties' window. In this window select 'Environmental Variables' to bring up a new window, then scroll down to PATH and enter the path to cmake.exe, click OK and close all windows to secure new settings.
On some versions of Windows this operation requires a restart before it takes affect, others you just need to open a new command prompt. I would start my opening a new command prompt and reentering 'echo %PATH%' command, looking for the new cmake path, if it's not here then restart Windows.

AWS Codedeploy fails in DownloadBundle event saying No such file or directory

I'm using AWS Codedeploy to deploy my code from GitHub to AWS EC2 instance(Windows 2008 server). Deployment fails in DownloadBundle event
Error stack in logs of AWS :
No such file or directory - C:\ProgramData/Amazon/CodeDeploy/4fbb84fd-caa5-4d1a-9894-16b25abcea76/d-QUPXMDBCF/deployment-archive-temp/My-Application-163e9d3343be82038fe2e5c58a9fcae86683d4ea/src/main/java/com/myapp/dewa/customexceptions/EventNotPublishedException.java
The problem here might be with the file path limit of windows.
UPDATE: AWS CodeDeploy Support team has confirmed that this is a limitation from their side. More than half of the file path is being used by CodeDeploy because of which limit is being exceeded
Have you replaced some strings from the file_path and/or file_name?
This error you get when the total length of the file_path is beyond 260 characters. This length includes one null character at the end for termination. Your total length is 239+1 = 240.
For reference, please see this article: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath
If you check the path in the destination, you should not see the file because it was not copied but it is in your revision zip file.
In my case, the total length was 266. It may not be possible to shorten the strings of the actual file path in the revision since lots of them are created by the developer tools. Amazon is investing at their end now to see how to overcome this.
You can test and confirm by doing the following:
Run the following command in the command prompt to create the deployment archive folder:
mkdir "c:\ProgramDat0/Amazon/CodeDeploy/4fbb84fd-caa5-4d1a-9894-16b25abcea76/d-QUPXMDBCF/deployment-archive-temp"
Simply try to extract your revision zip file directly under 'deployment-archive-temp' folder.
You should received the following error for file crossing the maximum path length of 260:
'Error 0x80010135: Path too long'
Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath
I hope this helps.
While not a complete solution, I've experienced the same problem and we were able to remove the preceding 'ProgramData\Amazon\CodeDeploy' to save 29 characters if you can stand the mess in your root folder.
To do this we modified the conf.yml file located in c:\programdata\amazon\codedeploy\
I changed ... root_dir: 'Amazon\CodeDeploy' ... to ... root_dir: 'C:\'
If you are using Windows 2016, setting the value to 1 for the following registry entry will fix the issue with long paths.
HKLM:SYSTEM\CurrentControlSet\Control\FileSystem
Referencing iskandar's post this can be done through a powershell script if you wish to automate it in something like a startup script.
# #see https://github.com/aws/aws-codedeploy-agent/issues/46
# #see https://learn.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#paths
Write-Verbose "----> Enabling Long Path Support"
$RegistryPath = "HKLM:SYSTEM\CurrentControlSet\Control\FileSystem"
$Name = "LongPathsEnabled"
New-ItemProperty -Path $RegistryPath -Name $Name -Value 1 -PropertyType DWORD -Force | Out-Null
# You'll want to reboot to make sure; this is Windows we're working with.
Restart-Computer
You can also use the GUI method outlined in this post.
Note - either method will definitely require a restart for the setting to take affect