Jump to content

Recommended Posts

Posted

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..


Posted

Download cmdow from here.

On second thought, if you followed the Guide's example on using RunOnceEx.cmd, are you not already using cmdow in that script? Just call the same function again at the start of your other scripts.

cmdow @ /HID
@echo off

Posted

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?

Posted

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

Posted

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

Posted

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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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