0

I run pageant (part of putty) at windows startup. There is currently (as of version .69 and .70) a bug where it dies after some time.

Therefore I want to write a script (bat, powershell, I don't mind which), in windows that essentially does this:

:loop
  "C:\Program Files (x86)\PuTTY\pageant.exe" C:\Users\user\Documents\mykey.ppk
goto loop

How do I do this such that there isn't a cmd window lying around?

This is perhaps related to How can I execute a Windows command line in background? But I don't want to start pageant in the background of the bat file otherwise it loops quickly.

I want the script itself to execute in the background and not to have a window. I prefer to do this in a single script. As in, not have to create a shortcut that starts a script.

1 Answers1

0

Use a command line tool to silently launch a process

Quiet, hidecon or hideexec

/NOCONSOLE after you cmd.exe

You go one thing if you need it in Minimized process without changing the Code.

Go to CMD --> Open CMD --> Right Click on the taskbar of CMD Icon. You Can see Command Prompt --> again right Click on that --> Properties --> You Can RUN: You get three Option Min, Max and Normal windows. Select MIN. --> APPLY --> OK

So whenever you run CMD it would open with MINIMIZED windows.