View unanswered posts | View active topics It is currently 31 Oct 2014 20:57



Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
**Dialog pop-up box after Install** 
Author Message

Joined: 05 Mar 2010 12:34
Posts: 16
Post **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.. :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


03 Jun 2012 20:46
Profile

Joined: 08 Apr 2012 17:11
Posts: 187
Post Re: **Dialog pop-up box after Install**
Quote:
/SUPPRESSMSGBOXES=%CD%

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


03 Jun 2012 21:53
Profile WWW

Joined: 10 Feb 2012 02:20
Posts: 4330
Post 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%" ....


04 Jun 2012 00:20
Profile

Joined: 05 Mar 2010 12:34
Posts: 16
Post Re: **Dialog pop-up box after Install**
Foxi your the Man!! :P

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


04 Jun 2012 04:02
Profile

Joined: 10 Feb 2012 02:20
Posts: 4330
Post 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.


04 Jun 2012 04:16
Profile

Joined: 05 Mar 2010 12:34
Posts: 16
Post Re: **Dialog pop-up box after Install**
Fawers .. FYI

Quote:
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:
for /f "delims=" %%x in ('dir /b *.exe') do set setup=%%x
start "" "%setup%" /S /VERYSILENT=%CD%
taskkill /f /im XviD-Dec.exe>nul


04 Jun 2012 04:23
Profile

Joined: 10 Feb 2012 02:20
Posts: 4330
Post 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.


04 Jun 2012 04:36
Profile

Joined: 05 Mar 2010 12:34
Posts: 16
Post 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...

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


04 Jun 2012 05:33
Profile

Joined: 10 Feb 2012 02:20
Posts: 4330
Post 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.


04 Jun 2012 05:41
Profile

Joined: 05 Mar 2010 12:34
Posts: 16
Post Re: **Dialog pop-up box after Install**
Foxi I revised my code with a delay as you suggested...
Quote:
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:


04 Jun 2012 06:18
Profile

Joined: 10 Feb 2012 02:20
Posts: 4330
Post 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:
:register
set DataDir=%windir%\SysWOW64
regsvr32 /s xvid.ax
set DataDir=%windir%\System32
regsvr32 /s xvid.ax


04 Jun 2012 06:25
Profile

Joined: 05 Mar 2010 12:34
Posts: 16
Post 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.


04 Jun 2012 07:06
Profile

Joined: 10 Feb 2012 02:20
Posts: 4330
Post 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.


04 Jun 2012 07:22
Profile

Joined: 05 Mar 2010 12:34
Posts: 16
Post 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"


04 Jun 2012 07:31
Profile

Joined: 05 Mar 2010 12:34
Posts: 16
Post Re: **Dialog pop-up box after Install**
correction.. my bad

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


04 Jun 2012 07:32
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: Bing [Bot], ShadowThief, Yahoo [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum style by Vjacheslav Trushkin for Free Forums/DivisionCore.