can I save my current dir and windows in cmder? - cmd

How to save my current setup in Cmder
I use Cmder on windows for all of my deving. I use a separate front and back end for my MEAN applications and also gulp for javascript minification. Also to run mongodb I use the cmder.
My window looks like this once everything is running
Every time I start work on my project I have to open all these windows and run the cd commands to get to their respective folders. I was wondering if there was a way to save the session so that I can have all my windows open automatically in their correct dir?

Use startup settings
You can write startup settings that allow you to execute a series of tasks on startup under
Settings > Startup > Tasks
Here you can define what shell starts and what tasks it should perform, with this you can open new tabs and cd to where you need to work.
A simpler version of this is to just go as far as
Settings > Startup
and find the radio button "Auto save/restore opened tabs", this will at least open up you Cmder where you left off, without the cmd's running.
Hope this helps people who use many windows on startup.

Related

i3: Open window in whatever workspace command was run from

I have the problem that some apps are slow to start up, so I want to be able to run a command and continue to work in another workspace while I wait for the application to start. I want the application to start in the workspace it was run in.
How can I configure i3 to do this?
There must be some technique either using placeholder windows that swallow up the windows you want or by tagging the window to be opened with a workspace number and configuring i3 to recognize those tags and place the window on the appropriate workspace.
I'm surprised there is not a simple solution built in.

Can I have multiple Powershell Consoles in one window?

So, now I have many open apps, often 3-4 powershell consoles. I'm able to order the powershell windows to watch them together (top left, top right, bottom left, bottom right).
So this means that if I switch to another app, when I switch back I have to restore all multiple powershell windows to see them all again.
What I want is, to create only one 'shared window' for many powershell, because when I need one, I need all of them to see.
Is there a way to do this?
Just to add more details about Windows Terminal approach:
Open a Windows Terminal
Type Alt+Shift+= or Alt+Shift+- to open a new Pane in the same tab
Type Shift+Ctrl+W to close the current Pane
If you need more details or modify the settings, go to next page Panes in Windows Terminal
ConEmu has this option.
You can also configure it to open as much consoles as you want when it starts.
ConEmu website
Enjoy!
VSCode can have Multiple Terminals which is the closest to this I've seen, quoted from documentaion:
You can create multiple terminals open to different locations and easily navigate between them. Terminal instances can be added by hitting the plus icon on the top-right of the TERMINAL panel or by triggering the Ctrl+Shift+` command. This creates another entry in the dropdown list that can be used to switch between them.
You can also split the terminal by triggering the Ctrl+\ command or via the right click context menu
Windows now provides the Windows Terminal.
Windows Terminal can split the terminal into panes and can also run different shells (i.e. cmd, powershell, and bash through the wsl)
You can install Windows Terminal directly from the Windows Store.
Create a virtual machine where you can run your PowerShell sessions uninterrupted. The PowerShell windows are always where I placed them when I come back.
It could be an expensive solution depending on your needs, but I have been doing this a long time. It's a robust solution since the only user processes on the VM are my PowerShell sessions.

C:\windows\SysWow64\CScript.exe window pop up

I created a macro in Excel and i am running it from a .vbs file. It's working fine on my laptop. I copied the same work on a new laptop and each time i am running the vbs file this window appears on the screen.
I have made some research and read that the situation i mentioned is happening when loading CheckNDISPort service on the startup. But i don't believe it's the reason because when i go to task manager and check in the startUp tab i don't find this service. Also when i restart my laptop i don't get this window, only when i am running my vbs file. I am sure there is any problem with my vbs file too because on the other laptops it's working fine.
Any suggestion please how to get ride of this pop up ? For now i am closing the window each time or ending the task from task manager but everytime i run it again so it pops up again.
Thank you very much.
Windows Scripting Host has two interpreter front-ends, wscript.exe and cscript.exe. cscript.exe is a console application and if cscript.exe is set as the default a console window will open every time you execute a script.
Run cmd.exe elevated as administrator and run wscript.exe //h:wscript.
Depending on the Windows version, you might also be able to right-click a .vbs file, select "Open with...", choose %windir%\system32\wscript.exe and check the "default" checkbox.

prompt user for password on windows 7 start up and log on in java

I want to prompt user for password whenever user starts windows system or when ever user logs in to windows system, is there any way to capture windows start up event in java?
No, I, unfortunately, do not think this is possible. Your Java application has to be called by Windows when it starts. Java doesn't really have the ability to 'start' other things like this.
Option 1:
One option you have is packaging your application in a jar or executable. Then, check out these directions. You basically want to create a shortcut in the start directory to point to the application. This is only really good if you have a dedicated application already created.
Option 2:
What I would do is try to launch a .bat file on startup. This can be achieved by doing the following:
start > all programs > right-click startup > open > right click batch file > create shortcut > drag shortcut to startup folder
And the batch file would look something like:
java -jar application.jar
I hope this helps you!

Opening up iTerm / Terminal with commands by default.

My current use of iTerm is the following everytime:
- Open up
- cd into my project folder
- open up another tab
- cd into my project folder
- Grunt Watch
- open up another tab
- SSH into live server
This is getting a bit tedious now, is there a simple way to make a one click for all of this to be done? I remember back in the windows days you could create custom command prompt files so it would open up and you could just double click it like an app.
Is there anyway I can do this? I have looked at the profiles and I don't think I can do what I am after with that.
Just need pointing in the right direction.
If you're using iTerm2, there is a feature called Arrangements (see the last entry on the page). With this, you can set iTerm to open a series of profiles (which can be set to run a command at startup, start in a specific directory, run a certain shell, etc.).
It seems that creating one profile for working in a directory, a second for the Grunt Watch, and a third to SSH should be trivial, and once the arrangement is saved, it can be recalled with the press of a hotkey (Cmd⇧R on my install). You can also set this to save split-pane windows if you don't want a separate window for each of these tasks.

Resources