Jump to content











Photo
- - - - -

Success pop-up window in silent mode

imdisk silent pop-up

  • Please log in to reply
5 replies to this topic

#1 supportPltf

supportPltf

    Newbie

  • Members
  • 10 posts
  •  
    France

Posted 04 January 2012 - 01:57 PM

Hi,

I recently update to imdisk 1.5.3 and I saw that there is a success pop-up in silent mode :
If I install using this command :
imdiskinst.exe –y

The install complete successfully, but I have a pop-up saying :
"Setup finished successfully. Open Imdisk Virtual Disk Driver in Control Panel

or use imdisk command line to manage your virtual disks!"

Could you please tell me if this new pop-up window is displayed on purpose in silent mode?

Regards,
Pltf

#2 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1339 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 04 January 2012 - 02:27 PM

Hi,

I recently update to imdisk 1.5.3 and I saw that there is a success pop-up in silent mode :
If I install using this command :

imdiskinst.exe –y

The install complete successfully, but I have a pop-up saying :
"Setup finished successfully. Open Imdisk Virtual Disk Driver in Control Panel

or use imdisk command line to manage your virtual disks!"

Could you please tell me if this new pop-up window is displayed on purpose in silent mode?


Not on purpose really, but there were some things changed in 1.5.3 to make things easier for non-expert users. For example it checks if there are any existing ImDisk virtual disks before upgrade and it also displays error message boxes if .inf part of setup failed. Unfortunately there is no way, or at least no way that I am aware of, for the setup cmd script to check if setup runs with -y switch. If there were such a method available it could just skip showing message boxes. But the -y switch only affect the 7-zip self-extractor and not the script it runs.

One workaround could be to change the cmd script to look for an environment variable, say IMDISK_SILENT_SETUP and if that variable is defined to, say, 1, it could skip displaying message boxes. You could then define that environment variable from your application or script that invokes imdiskinst.exe so that it will be inherited down to the cmd setup script.

Or do anyone have any better idea?

#3 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2813 posts
  •  
    United States

Posted 04 January 2012 - 03:10 PM

Could you please tell me if this new pop-up window is displayed on purpose in silent mode?

Why not just comment out the msgbox bit at the end of install.cmd and re-package it? Or run hidden:

rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 .\imdisk.inf

instead of using install.cmd?

#4 TheQrtKenny

TheQrtKenny
  • Members
  • 1 posts
  •  
    Denmark

Posted 21 January 2017 - 12:34 PM

Hi,

Imdisk is using 7zip extracter/installer and uses "msgboxw.exe" to show the popup.

So I made this simple powershell thing:

 

& C:\Temp\imdiskinst.exe -y
$proc = $null
while(!($proc))
{
    $proc = Get-Process -Name msgboxw -ErrorAction:SilentlyContinue | Where-Object {$_.MainWindowTitle -like "*ImDisk Virtual Disk Driver setup*" } -ErrorAction:SilentlyContinue
}
$proc.CloseMainWindow()
 
 
Brgds
TheQrtKenny


#5 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1339 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 21 January 2017 - 12:51 PM

Hi,
Imdisk is using 7zip extracter/installer and uses "msgboxw.exe" to show the popup.
So I made this simple powershell thing:
 
& C:\Temp\imdiskinst.exe -y
$proc = $null
while(!($proc))
{
    $proc = Get-Process -Name msgboxw -ErrorAction:SilentlyContinue | Where-Object {$_.MainWindowTitle -like "*ImDisk Virtual Disk Driver setup*" } -ErrorAction:SilentlyContinue
}
$proc.CloseMainWindow()


Thanks, but nowadays you can simply set an environment variable before running the setup to avoid the message box. There are instructions in the FAQ how to do that.

#6 ndog37

ndog37

    Member

  • Members
  • 75 posts
  •  
    New Zealand

Posted 22 January 2017 - 03:44 AM

Although it is cool that you engineered a solution to close popup windows with a powershell script, with all its restrictions on unsigned and execution-policy headaches

 

& C:\Temp\imdiskinst.exe -y

$proc = $null
while(!($proc))
{
    $proc = Get-Process -Name msgboxw -ErrorAction:SilentlyContinue | Where-Object {$_.MainWindowTitle -like "*ImDisk Virtual Disk Driver setup*" } -ErrorAction:SilentlyContinue
}
$proc.CloseMainWindow()

 

A simpler approach with batch would be

set IMDISK_SILENT_SETUP=1
"%~dp0imdiskinst.exe" -y

Edited by ndog37, 22 January 2017 - 03:46 AM.

  • Olof Lagerkvist likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users