**Dialog pop-up box after Install**

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
SuzyQJax
Posts: 16
Joined: 05 Mar 2010 12:34

**Dialog pop-up box after Install**

#1 Post by SuzyQJax » 03 Jun 2012 20:46

:================================================================+
@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.. :roll:

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

Fawers
Posts: 187
Joined: 08 Apr 2012 17:11
Contact:

Re: **Dialog pop-up box after Install**

#2 Post by Fawers » 03 Jun 2012 21:53

/SUPPRESSMSGBOXES=%CD%

What on Earth is that? Why is the current directory the value for "supressmsgboxes"?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: **Dialog pop-up box after Install**

#3 Post by foxidrive » 04 Jun 2012 00:20

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

SuzyQJax
Posts: 16
Joined: 05 Mar 2010 12:34

Re: **Dialog pop-up box after Install**

#4 Post by SuzyQJax » 04 Jun 2012 04:02

Foxi your the Man!! :P

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 :wink:

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: **Dialog pop-up box after Install**

#5 Post by foxidrive » 04 Jun 2012 04:16

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.

SuzyQJax
Posts: 16
Joined: 05 Mar 2010 12:34

Re: **Dialog pop-up box after Install**

#6 Post by SuzyQJax » 04 Jun 2012 04:23

Fawers .. FYI

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

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: **Dialog pop-up box after Install**

#7 Post by foxidrive » 04 Jun 2012 04:36

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.

SuzyQJax
Posts: 16
Joined: 05 Mar 2010 12:34

Re: **Dialog pop-up box after Install**

#8 Post by SuzyQJax » 04 Jun 2012 05:33

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

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

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: **Dialog pop-up box after Install**

#9 Post by foxidrive » 04 Jun 2012 05:41

You have made an error. =%cd% should not be at the end of those switches and it may have stopped /SUPPRESSMSGBOXES from working.

SuzyQJax
Posts: 16
Joined: 05 Mar 2010 12:34

Re: **Dialog pop-up box after Install**

#10 Post by SuzyQJax » 04 Jun 2012 06:18

Foxi I revised my code with a delay as you suggested...
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!! :lol:

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: **Dialog pop-up box after Install**

#11 Post by foxidrive » 04 Jun 2012 06:25

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

SuzyQJax
Posts: 16
Joined: 05 Mar 2010 12:34

Re: **Dialog pop-up box after Install**

#12 Post by SuzyQJax » 04 Jun 2012 07:06

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.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: **Dialog pop-up box after Install**

#13 Post by foxidrive » 04 Jun 2012 07:22

The trouble there is that using the set command doesn't do anything to change directories and you are registering the same file.

SuzyQJax
Posts: 16
Joined: 05 Mar 2010 12:34

Re: **Dialog pop-up box after Install**

#14 Post by SuzyQJax » 04 Jun 2012 07:31

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"

SuzyQJax
Posts: 16
Joined: 05 Mar 2010 12:34

Re: **Dialog pop-up box after Install**

#15 Post by SuzyQJax » 04 Jun 2012 07:32

correction.. my bad

regsvr32 /s "%windir%\syswow64\xvid.ax"
regsvr32 /s "%windir%\system32\xvid.ax"

Post Reply