Jump to content

running batch minimized


Recommended Posts

hi..

although i'm usinng runonceex.cmd to install majority of my programs.. it does call one or two other .cmd's which i use to run some extra processes, as i couldn't get it to work in runonceex.cmd..

so would it be possible to make a batch file run silently/minimized so that it's doesn't cover up the whole screen when runing a short batch file..

thanx..

Link to comment
Share on other sites


nah.. i think u misunderstood what i was tryin to say...

i am using runonceex.cmd With cmdow...

but i'm using it to call another .cmd batch file, which does NOT use cmdow..

it's just a normal .cmd e.g.

@echo off
ECHO.
ECHO Installing WinAmp 5.07 Pro
ECHO Please wait...
start /wait %systemdrive%\install\winamp\winamp507_pro.exe /S /ncrc /install=DSRFQA
start taskkill.exe /F /IM winamp.exe
regedit /s %systemdrive%\install\winamp\regkey.reg
Echo Unregistering WinAmp Agent
REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WinampAgent /f
exit

i'm using that WITHOUT cmdow, as i cannot call the taskkill.exe line. (either i don't know how to do it, or its not possible) i have tried.. didn't work.

so the batch file i'm mentioning in the (code), can i get that to run silently, or atleast minimized?

Link to comment
Share on other sites

u can run it silently calling your batch from within an autoit script using @SW_HIDE OR u can use cmdow

u put cmdow @ the bigging of your script

cmdow @ /HID
@echo off
ECHO.
ECHO Installing WinAmp 5.07 Pro
ECHO Please wait...
start /wait %systemdrive%\install\winamp\winamp507_pro.exe /S /ncrc /install=DSRFQA
start taskkill.exe /F /IM winamp.exe
regedit /s %systemdrive%\install\winamp\regkey.reg
Echo Unregistering WinAmp Agent
REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WinampAgent /f
exit

EDIT: & the command is try pskill ? to kill the task, once its in system32 directory

add: pskill filename

Link to comment
Share on other sites

Try This It Will Make A Small Box With Most Of What Was Echo Is Now On The Title bar

@echo off
Mode Con: Cols=40 Lines=2
color 8f
TITLE Installing WinAmp 5.07 Pro
ECHO.
ECHO Please wait...
start /wait %systemdrive%\install\winamp\winamp507_pro.exe /S /ncrc /install=DSRFQA
start taskkill.exe /F /IM winamp.exe
regedit /s %systemdrive%\install\winamp\regkey.reg
TITLE Unregistering WinAmp Agent
REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WinampAgent /f
exit

Link to comment
Share on other sites

I didn't misunderstand you at all. Is there any reason this other cmd file can't use cmdow? If you think about it, RunOnceEx.cmd is just a normal .cmd file too. The only thing that differentiates it is the fact that the very first thing it does is execute the cmdow command that hides the window. At least, that's my interpretation of it.

Adding that same cmdow line to the start of this file should accomplish exactly what you want. Try using this as a replacement for the code you posted:

cmdow @ /HID
@echo off
start /wait %systemdrive%\install\winamp\winamp507_pro.exe /S /ncrc /install=DSRFQA
taskkill /F /IM winamp.exe
regedit /s %systemdrive%\install\winamp\regkey.reg
REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WinampAgent /f
exit

I removed the echo statements since there is no need for them in an invisible environment. ;)

Incidently, for Winamp in particular, Alanoll created an MSI for it that you can download from here. This is what I'm using to install Winamp on my uA CD. Of course, this won't help with any of the other cmds that you need to call, but it may let you get rid of this one. :)

EDIT: & the command is try pskill ? to kill the task, once its in system32 directory

add: pskill filename

Taskkill is a Windows command that, AFAIK, provides essentially the same functionality as pskill. As coded in both of the posted batch files it should do what he needs it to do.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...