You are not logged in.
Is there a way to hide cmd from within cmd script?
For instance, I have the following code (notepad.cmd):
pushd %~dp0
start "" notepad.exe
I would like to hide it by adding a code inside the script. Without adding an external call like hide.vbs notepad.cmd.
Is this possible?
Thank you
Offline
I would like to hide it by adding a code inside the script. Without adding an external call like hide.vbs notepad.cmd.
Is this possible?
Not without an external command.
cmdow can hide a window.
Last edited by foxidrive (12 Dec 2015 12:55)
Offline
AFAIK this is not possible without some sort of external call. You can potentially embed the VBS within your script, if you want to keep it self contained. You could either write out the VBS script when needed, and delete it afterwards, or take a look at some hybrid script methods discussed here:
http://www.dostips.com/forum/viewtopic.php?t=5543
cmd | *sh | ruby | chef
Offline
Are you try to create a link?
It is possible start minimized on link property and the result is that nothing appear ....
Einstein1969
Last edited by einstein1969 (12 Dec 2015 15:43)
Offline
AFAIK this is not possible without some sort of external call. You can potentially embed the VBS within your script, if you want to keep it self contained.
That's what I'd like to do. Any examples of such a thing?
Offline
Even this method is not accepted i show how setting a link for running minimized via vbs.
minimize.vbs:
set wshell=createobject("wscript.shell")
set lnk=wshell.createshortcut(wscript.arguments.item(0))
lnk.windowstyle=7
lnk.save
but there is this method for create a HIDDEN (start hidden) link!
@ Echo off
if not exist "%~f1" (
echo not found - "%~f1"
goto :eof
)
> %temp%\.url echo;[InternetShortcut]
>>%temp%\.url echo;URL=%~f1
>>%temp%\.url echo;ShowCommand=0
%temp%\.url
del %temp%\.url
This method is an alternative to use VBS.
I not show the vbs run hidden because is well knowed.
Einstein1969
Offline
That's what I'd like to do. Any examples of such a thing?
Err yes, in the link that was also in my post.
Actually, can you clarify what you mean by "hide"? I took you to mean that wanted the active window to be removed from view (including the taskbar button). This is not achievable without something like a VBS call. If you just want the window to run in a minimised state, that can be done quite readily when the script starts:
@echo off
if "%~1" NEQ "/child" (
REM spawn self minimised
start /min "" cmd /c "%~0" /child %*
goto :EOF
)
REM main script goes here
Last edited by bluesxman (14 Dec 2015 12:36)
cmd | *sh | ruby | chef
Offline
That's exactly what I wanted.
Thank you so much.
Offline
Cool
cmd | *sh | ruby | chef
Offline