Giter Club home page Giter Club logo

silentcmd's People

Contributors

stbrenner avatar stephan-brenner avatar ymx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

silentcmd's Issues

Mention `start "" \path\SilentCMD` in the README to prevent cmd prompt from appearing

Would it be worth mentioning in the README that prepending SilentCMD with start "" can prevent the command prompt from appearing at all (source)? I found it useful for startup scripts.

Example: C:\Users\<USER>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\sshd-interactive-mode.bat:

start "" C:\Users\<USER>\bin\SilentCMD\SilentCMD.exe ^
"C:\Program Files\OpenSSH\sshd.exe" ^
-f C:\Users\<USER>\.ssh\sshd_config

start "" here prevents the cmd prompt from appearing on start. Without it the cmd prompt window lingers on the desktop even though the program exited.

But maybe it's obvious for more experienced windows users/admins.

Great utility by the way - thank you!

Default logfile

When no log path is provided, SilentCMD should create a default log file under %temp%\SilentCMD.log

Log file timestamps and other customization...

Is there a way to print the log timestamps in international format?

YYYY-MM-DD HH:MM:SS.ms (24 hr)

So that the timestamp is consistent regardless of user's OS region settings!

This also includes having leading zeros. so a time of 8:35:3.344 would be shown as 08:35:03.334. Again, this is for consistency in the timestamp format.


I would also like to see you skip a line (insert blank line) between each command that is run within the CMD/BAT script

And skip 2 lines at the end. So that if append mode is used, it is easier to see when the run occurs when scanning the log visually.


option to show duration time of CMD run in seconds. You can print this on a separate line right after : Finished "path\to\script.CMD"

Duration: 52.2531243 seconds. or HH:mm:ss,ms format might be good. Or both

Duration: 00:00:52.2531243 or 52.2531243 seconds.

Great program btw. Thank you.

Similar cmd tool for PowerShell?

If you launch PowerShell from Task Scheduler (+ parameters) a console will flash for a moment even using "-WindowStyle hidden".
Do you know an equivalent of SilenCMD to hide PowerShell console completely?

Cannot find the file in the current directory when run elevated mode

When we only put filename, and run silentCMD under elevated mode (run as administrator), it cannot find the file.

<setting name="DefaultBatchFilePath" serializeAs="String">
      <value>test.bat</value>
</setting>

I have to change the Environment.CurrentDirectory + filename
become Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + filename.
Then it only able to find the file for both normal mode & elevated mode.

===
This is a great program. Thanks.

Task Scheduler

should SilentCMD.exe still be running in Task Manager after its done the thing I told it to do in Task Scheduler?

custom title

I would be great if we can pass custom process title, to able to detect which proccess is running

https://prnt.sc/PxxI26I2YOA7

the batch "title XXX" does not affecting the taskmanager due is running through silentCMD

Injecting Admin Creds

In the config xml
How would you specify username and password ?

<setting name="DefaultBatchFileArguments" serializeAs="String">
    <value>username="admin"</value>
    <value>password="password"</value>
</setting>

SilentCMD new feature

SilentCMD [BatchFile [BatchArguments]] [Options]

Options:
/LOG:file :: output status to LOG file (overwrite existing log).
/LOG+:file :: output status to LOG file (append to existing log).
/DELAY:seconds ( delay the execution of BAT/CMD file by xxxx seconds )

Examples
SilentCMD c:\DoSomething.bat
SilentCMD c:\MyBatch.cmd MyParam1 /LOG:c:\MyLog.txt
SilentCMD c:\MyBatch.cmd /LOG+:c:\MyLog.txt
SilentCMD c:\MyBatch.cmd /DELAY:3600 /LOG+:c:\MyLog.txt

--- Very useful at boot for NET commands

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.