**Dialog pop-up box after Install**
Moderator: DosItHelp
**Dialog pop-up box after Install**
:================================================================+
@echo off &cls mode con:cols=75 lines=20
for /f "delims=" %%x in ('dir /b *.exe') do set setup=%%x
"%setup%" /S /VERYSILENT /HIDE /SUPPRESSMSGBOXES=%CD%
taskkill /f /im XviD-Dec.exe>nul
:================================================================+
Ok guys sure there is something simple I am missing..
when I run a silent install from command-line my .exe installs but
it pop-ups a confirm box to click OK and the batch stalls out.
I added the taskkill but it wont go to the next line of my batch.
Please help,
Thanks! SuzyQ
@echo off &cls mode con:cols=75 lines=20
for /f "delims=" %%x in ('dir /b *.exe') do set setup=%%x
"%setup%" /S /VERYSILENT /HIDE /SUPPRESSMSGBOXES=%CD%
taskkill /f /im XviD-Dec.exe>nul
:================================================================+
Ok guys sure there is something simple I am missing..
when I run a silent install from command-line my .exe installs but
it pop-ups a confirm box to click OK and the batch stalls out.
I added the taskkill but it wont go to the next line of my batch.
Please help,
Thanks! SuzyQ
Re: **Dialog pop-up box after Install**
/SUPPRESSMSGBOXES=%CD%
What on Earth is that? Why is the current directory the value for "supressmsgboxes"?
Re: **Dialog pop-up box after Install**
SuzyQJax wrote:when I run a silent install from command-line my .exe installs but
it pop-ups a confirm box to click OK and the batch stalls out.
I added the taskkill but it wont go to the next line of my batch.
You will need to disable the confirmation box with a switch, if there is one.
Or use this so they run concurrently. You will still need to deal with the confirmation box.
start "" "%setup%" ....
Re: **Dialog pop-up box after Install**
Foxi your the Man!!
There was no switch to disable the box, and the supressmsgbox switch would not work
either but your start "" worked! and then went to my taskkill line which does kills the pop-up box.
Foxi, could you explain Why the start "" would allow this??
Suzy
Or use this so they run concurrently. You will still need to deal with the confirmation box.
start "" "%setup%" ....
There was no switch to disable the box, and the supressmsgbox switch would not work
either but your start "" worked! and then went to my taskkill line which does kills the pop-up box.
Foxi, could you explain Why the start "" would allow this??
Code: Select all
:install
for /f "delims=" %%x in ('dir /b *.exe') do set setup=%%x
start "" "%setup%" /S /VERYSILENT /HIDE /SUPPRESSMSGBOXES=%CD%
:kill confirm box
taskkill /f /im XviD-Dec.exe>nul
Suzy
Re: **Dialog pop-up box after Install**
Your switch below looks odd. I am not sure that it's set correctly.
/SUPPRESSMSGBOXES=%CD%
Start "" allows all the %setup% programs to run in another process and the batch file can continue.
/SUPPRESSMSGBOXES=%CD%
Start "" allows all the %setup% programs to run in another process and the batch file can continue.
Re: **Dialog pop-up box after Install**
Fawers .. FYI
1.I know my script may be a little over the top but it does not require a file name for my .exe
2.The Supressmsgbox switch is from http://silentswitch.wordpress.com/a/
3.and CD because once everything in my directory is working I will then create a SelF eXtracting
(SFX) Archive File using WinRAR or 7-Zip for my silent unattended install.
My new working code:
What on Earth is that? Why is the current directory the value for "supressmsgboxes"?
1.I know my script may be a little over the top but it does not require a file name for my .exe
2.The Supressmsgbox switch is from http://silentswitch.wordpress.com/a/
3.and CD because once everything in my directory is working I will then create a SelF eXtracting
(SFX) Archive File using WinRAR or 7-Zip for my silent unattended install.
My new working code:
Code: Select all
for /f "delims=" %%x in ('dir /b *.exe') do set setup=%%x
start "" "%setup%" /S /VERYSILENT=%CD%
taskkill /f /im XviD-Dec.exe>nul
Re: **Dialog pop-up box after Install**
SuzyQJax wrote:2.The Supressmsgbox switch is from http://silentswitch.wordpress.com/a/
It is not listed on that page with =%cd%
Your code will fail on a slower machine as the task will be killed before it finishes. You need a delay before the taskkill.
Re: **Dialog pop-up box after Install**
My bad Foxi.. The =%CD% is listed on this site since my .exe is a NSIS installer.
[url][http://code.google.com/p/windows-package-manager/wiki/InstallationScripts
/url]
My finished Install.cmd WORKING Code that I made into a sfx file using winrar...
Thanks for all your help ...
[url][http://code.google.com/p/windows-package-manager/wiki/InstallationScripts
/url]
My finished Install.cmd WORKING Code that I made into a sfx file using winrar...
Code: Select all
:info
:Installs Nic's XviD Decoder for Windows 7
:install
for /f "delims=" %%x in ('dir /b *.exe') do set setup=%%x
start "" "%setup%" /S /VERYSILENT=%CD%
:kill pop-up
taskkill /f /im XviD-Dec.exe>nul
:clean install files from temp folder
set DataDir=%userprofile%\appdata\local\temp
del /q/s/f "%DataDir%">nul&rd /s/q "%DataDir%">nul 2>&1
md "%DataDir%">nul 2>&1
:register
set DataDir=%windir%\SysWOW64
regsvr32 /s xvid.ax
set DataDir=%windir%\System32
regsvr32 /s xvid.ax
:refresh desktop with 2-sec delay
taskkill /f /im explorer.exe>nul
ping -n 2 127.0.0.1 >nul
start explorer.exe
exit
Thanks for all your help ...
Re: **Dialog pop-up box after Install**
You have made an error. =%cd% should not be at the end of those switches and it may have stopped /SUPPRESSMSGBOXES from working.
Re: **Dialog pop-up box after Install**
Foxi I revised my code with a delay as you suggested...
:install
start "" XviD-Dec.exe /S /VERYSILENT
:delay 1 sec
ping -n 1 127.0.0.1 >nul
:kill pop-up
taskkill /f /im XviD-Dec.exe>nul
:clean temp folder
set DataDir=%userprofile%\appdata\local\temp
del /q/s/f "%DataDir%">nul&rd /s/q "%DataDir%">nul 2>&1
md "%DataDir%">nul 2>&1
:register
set DataDir=%windir%\SysWOW64
regsvr32 /s xvid.ax
set DataDir=%windir%\System32
regsvr32 /s xvid.ax
exit
Thanks!!
Your code will fail on a slower machine as the task will be killed before it finishes. You need a delay before the taskkill.
:install
start "" XviD-Dec.exe /S /VERYSILENT
:delay 1 sec
ping -n 1 127.0.0.1 >nul
:kill pop-up
taskkill /f /im XviD-Dec.exe>nul
:clean temp folder
set DataDir=%userprofile%\appdata\local\temp
del /q/s/f "%DataDir%">nul&rd /s/q "%DataDir%">nul 2>&1
md "%DataDir%">nul 2>&1
:register
set DataDir=%windir%\SysWOW64
regsvr32 /s xvid.ax
set DataDir=%windir%\System32
regsvr32 /s xvid.ax
exit
Thanks!!
Re: **Dialog pop-up box after Install**
The set commands below aren't doing anything AFAICS and you're just registering the file twice.
Code: Select all
:register
set DataDir=%windir%\SysWOW64
regsvr32 /s xvid.ax
set DataDir=%windir%\System32
regsvr32 /s xvid.ax
Re: **Dialog pop-up box after Install**
foxi ..
since its on a 64-bit system it has a 64-bit .ax then the 32-bit
so both Codecs DO need to be registered.
since its on a 64-bit system it has a 64-bit .ax then the 32-bit
so both Codecs DO need to be registered.
Re: **Dialog pop-up box after Install**
The trouble there is that using the set command doesn't do anything to change directories and you are registering the same file.
Re: **Dialog pop-up box after Install**
Been using that set command for years and it has always worked ..
but If IMYFB then I could use:
regsvr32 /s "%windir%\syswow64\xvid.ax"
regsvr32 /s "%windir%\syswow64\xvid.ax"
but If IMYFB then I could use:
regsvr32 /s "%windir%\syswow64\xvid.ax"
regsvr32 /s "%windir%\syswow64\xvid.ax"
Re: **Dialog pop-up box after Install**
correction.. my bad
regsvr32 /s "%windir%\syswow64\xvid.ax"
regsvr32 /s "%windir%\system32\xvid.ax"
regsvr32 /s "%windir%\syswow64\xvid.ax"
regsvr32 /s "%windir%\system32\xvid.ax"