How to use Neo4j in command prompt without running as administrator - windows

I am trying to use Neo4j 3.0.3 (zip file) command line tools in the command prompt on Windows 10. The problem is that it won't execute the files unless I run the command prompt as administrator. This is an issue for me because I can't run the command prompt as administrator on my machine I use for production. How can I run the Neo4j command prompt tools (neo4j-import.bat, etc.) without administrator mode? Is it possible?

Related

Powershell cannot be loaded because running scripts is disabled on this system

My question related to yarn. Before when I start create projects I installed with npm.
After a long time when I want to start running with yarn it shows the following error:
yarn : File C:\Users\pc\AppData\Roaming\npm\yarn.ps1 cannot be loaded because running scripts is disabled on this system.
(in Windows machine, Powershell)
Windows: 10
I tried with git bash terminal it worked!
but not in my powershell terminal
I have just fixed it by myself, anyway I am going to post answer here:
//open windows command Power shell as administrator and run command
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted

"sudo su" equivalent in windows

I've seen multiple questions on this topic and some answers about runas but none of them was sufficient...
I need a Windows command to upgrade privileges of a terminal after it has already been opened with permissions of an average user. ie. To upgrade permissions for the whole terminal session and not just to run one command as administrator! Something just like sudo su in Linux.
If anyone knows any trick to do this that would be much appreciated.
Edit:
Why I need this? I use the terminal in Visual Studio Code; it wouldn't let me run commands that require administrative permissions. It sucks to have to open an external terminal to do this... And currently, the only way I'm aware of to run a terminal in VS code in elevated permissions would be by editing the Code.exe's compatibility settings to run as administrator. But that adds more trouble because now it shows the user account control prompt every time I run an instance of VS Code.
Also creating a special shortcut to run VS Code in administrative mode wouldn't help because I run it from the context menu (Open With Code) so I don't have to manually navigate to the project folder.
There is no such an equivalent in Windows.
What you might do is to open your desired process from cmd with:
runas /user:administrator processname.
or open any application with right-click and run as..

Batch as a windows service

I am running a Jenkins on windows machine with the process of Jenkins.war.
'java -jar jenkins.war'. If I close the command prompt of the service, Jenkins will go down. I want the Jenkins to be up even if the command prompt closed and even after machine reboot, this jenkins to be started. How can we do this on windows machine?
You can use create-windows-service-from-executable to make your jenkins.exe as a service. Or else while installing itself, install as a service rather than starting from command line

Anyway to use the Ubuntu Bash shell in VSCode for Integrated or External Shell on Win10?

If I open a command shell (e.g. Win-X,c) I can type "bash" and open a Bash Shell. But when I try to configure VSCore to use bash.exe (in /Windows/System32) as the shell command it says it can't find it. I suspect it's the Electron security context, but I wonder if I'm missing a way. Here's what I've tried in my settings.json:
{
...
"terminal.external.windowsExec": "C:\\Windows\\System32\\bash.exe",
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe"
}
Any clues?
Assume you have Developer Mode turned on in Updates & Security, For developers. Then go to Programs and Features in Control Panel, Turn Windows features on or off, and tick Windows Subsystem for Linux (bets). Restart. First time you hit yor bash configured terminal from VSCode, it will prompt you to install Linux for Ubuntu on Windows. Then login when prompted or create new username/password.

How do you install dependent programs with a batch file?

I'd like to install two programs (program.exe, program_sp1.exe) via batch script.
The problem is that the first install adds environment variables that are needed by the 2nd.
Is there a good way to run the 2nd installer in a new command prompt so the values are picked up, but without user interaction to close it?
I've tried this in a Windows 7 Machine.
You should be able to run program.exe and the run cmd and then run your program_sp1.exe, and an exit as the cmd is running another version in itself with the updated environment variables.

Resources