Opened 4 years ago

Last modified 7 months ago

#2755 new defect

Commandline switch "/S" is not working anymore

Reported by: derseppel Owned by: grass-dev@…
Priority: normal Milestone: 7.0.7
Component: Installation Version: 7.0.1
Keywords: wingrass Cc:
CPU: Unspecified Platform: MSWindows 7

Description

When using the "WinGRASS-7.0.1-1-Setup.exe" with the Commandline parameter "/S" to perform a silent installation a window appears.

This window is asking me if I wish to install the MS Visual C++ Packages (see attachment).

With the old "WinGRASS-7.0.0-1-Setup.exe" everything works fine.

IDK which default action should be applied here. For me it would be OK when the installer simply does not install any MS Visual C++ Packages.

Best way would be (maybe a lot of work to do here) to check if the VC++ Packages are installed and add them only if they are not.

Attachments (1)

Setup_window.PNG (40.2 KB) - added by derseppel 4 years ago.

Download all attachments as: .zip

Change History (35)

Changed 4 years ago by derseppel

Attachment: Setup_window.PNG added

comment:1 Changed 4 years ago by martinl

Keywords: wingrass added
Milestone: 7.0.1

comment:2 Changed 4 years ago by martinl

Milestone: 7.0.17.0.2

comment:3 Changed 4 years ago by neteler

Milestone: 7.0.27.0.3

Ticket retargeted after milestone closed

comment:4 Changed 4 years ago by DerSeppel

Will it will be fixed in Version 7.0.3 or is it deferred again?

just asking because its not in the "Closed bugs since the last release" list (https://trac.osgeo.org/grass/wiki/Release/7.0.3-News)

comment:5 in reply to:  4 Changed 4 years ago by martinl

Replying to DerSeppel:

Will it will be fixed in Version 7.0.3 or is it deferred again?

probably not, I don't know if anybody is working on this issue.

comment:6 in reply to:  4 ; Changed 4 years ago by neteler

Replying to DerSeppel:

Will it will be fixed in Version 7.0.3 or is it deferred again?

Would you want /S to automatically install these (needed) MS Visual C++ Packages or to skip them?

comment:7 in reply to:  6 ; Changed 4 years ago by derseppel

Replying to neteler:

Replying to DerSeppel:

Will it will be fixed in Version 7.0.3 or is it deferred again?

Would you want /S to automatically install these (needed) MS Visual C++ Packages or to skip them?

Depends on how this will be implemented.

If it checks which versions are already installed and then just installs the missing versions, it would be nice.

But for me it will also be Ok if all VC++ installations are skipped when the needed versions are documented somewhere easy to find.

comment:8 in reply to:  7 ; Changed 4 years ago by hellik

Replying to derseppel:

Replying to neteler:

Replying to DerSeppel:

Will it will be fixed in Version 7.0.3 or is it deferred again?

Would you want /S to automatically install these (needed) MS Visual C++ Packages or to skip them?

Depends on how this will be implemented.

If it checks which versions are already installed and then just installs the missing versions, it would be nice.

But for me it will also be Ok if all VC++ installations are skipped when the needed versions are documented somewhere easy to find.

the reason why the windows pops up is that some time ago it was changed to install the runtimes by default.

AFAIR background: there were many complaints in the ML that winGRASS isn't working caused by missing runtimes; therefore the install by default. the runtimes can't be deployed by winGRASS itself cause of licensing issues; therefore the explicit popup window informing.

have a randomly look e.g. at:

http://stackoverflow.com/questions/12206314/detect-if-visual-c-redistributable-for-visual-studio-2012-is-installed

there is no easy way to determine/identify which MS runtime versions are already installed, complicated by 32bit and 64 bit and so much different runtime versions (SP, etc etc).

some possibilities to solve this ticket:

  • find an easy way to implement how to check already installed MS runtimes versions and compare it with the needed ones and install it case by case (input/code/... very welcome!)
  • change the installer back to previous status (without installing MS runtimes by default); possible sideeffect: new complaints of users tha winGRASS isn't working (see above)

I tend to wontfix for this ticket.

any opinions?

comment:9 in reply to:  8 ; Changed 4 years ago by hellik

Replying to hellik:

some possibilities to solve this ticket:

  • find an easy way to implement how to check already installed MS runtimes versions and compare it with the needed ones and install it case by case (input/code/... very welcome!)
  • change the installer back to previous status (without installing MS runtimes by default); possible sideeffect: new complaints of users tha winGRASS isn't working (see above)

I tend to wontfix for this ticket.

any opinions?

a third possibility:

  • find a way (new additional flag/parameter?) for the "/S" installation mode to skip MS runtime installation (input/code/.. very welcome).

comment:10 in reply to:  9 ; Changed 4 years ago by derseppel

what about installing MS VC++ in "normal" (GUI) mode and just skip it in silent mode.

I think people (Admins) using the /S switch should be smart enough to find out what is missing (as I already said, it should be documented somewhere).

If not, maybe your error message isn't clear enough. As you see, the problem can be solved on many stages.

I tend to wontfix for this ticket. <-- Worst you can do. I don't think taht I am the only one who needs a silent install to deploy software in a huge environment.

comment:11 in reply to:  10 ; Changed 4 years ago by hellik

Replying to derseppel:

what about installing MS VC++ in "normal" (GUI) mode and just skip it in silent mode.

I think people (Admins) using the /S switch should be smart enough to find out what is missing (as I already said, it should be documented somewhere).

I tend to wontfix for this ticket. <-- Worst you can do. I don't think taht I am the only one who needs a silent install to deploy software in a huge environment.

for some input:

NSIS doc1 NSIS doc2 NSIS doc3

4.9.4.12 IfSilent

jump_if_silent [jump_if_not]

Checks the silent flag, and jumps to jump_if_silent if the installer is silent, otherwise jumps to jump_if_not. The silent flag can be set by SilentInstall, SilentUninstall, SetSilent and by the user passing /S on the command line.

IfSilent +2
  ExecWait '"$INSTDIR\nonsilentprogram.exe"'

If not, maybe your error message isn't clear enough. As you see, the problem can be solved on many stages.

direct hints where improvement should go/code snippets/sentences for better are messages/etc are always welcome. :-)

comment:12 in reply to:  11 Changed 4 years ago by hellik

Replying to hellik:

4.9.4.12 IfSilent

jump_if_silent [jump_if_not]

Checks the silent flag, and jumps to jump_if_silent if the installer is silent, otherwise jumps to jump_if_not. The silent flag can be set by SilentInstall, SilentUninstall, SetSilent and by the user passing /S on the command line.

IfSilent +2
  ExecWait '"$INSTDIR\nonsilentprogram.exe"'

maybe another (easier?) way to skip the MS runtime installation in silent mode?

${IfNot} ${Silent}
  ....
${EndIf}

comment:13 Changed 4 years ago by hellik

Milestone: 7.0.37.0.4

comment:14 in reply to:  10 ; Changed 4 years ago by hellik

Replying to derseppel:

I tend to wontfix for this ticket. <-- Worst you can do

changed milestone to 7.0.4.

Last edited 4 years ago by neteler (previous) (diff)

comment:15 in reply to:  14 Changed 4 years ago by derseppel

Thanks

comment:16 Changed 4 years ago by martinl

Milestone: 7.0.47.0.5

comment:17 Changed 3 years ago by neteler

Milestone: 7.0.57.0.6

comment:18 in reply to:  11 Changed 3 years ago by user5

Replying to hellik:

what about installing MS VC++ in "normal" (GUI) mode and just skip it in silent mode.

I think people (Admins) using the /S switch should be smart enough to find out what is missing (as I already said, it should be documented somewhere).

I tend to wontfix for this ticket. <-- Worst you can do. I don't think that I am the only one who needs a silent install to deploy software in a huge environment.

Hello, I just wanted to say that I ran into the same problem whlie trying to deploy to a student computer pool. I think that a change, so that VC++ isn't installed in silent mode would be the best way, too.

So can we maybe get another statement about that?

Thanks in advance

comment:19 Changed 23 months ago by aaronsmiley

Hey there, thank you guys for making the software and creating a /S option for software packaging!

I'm currently trying to package this for a University lab image, and I can't figure out how to suppress the prompt for VC++. I have no problem making sure the dependencies are there in advance. Is there some way I can suppress this message so the software will install silently?

Thank you again!

Aaron

comment:20 in reply to:  19 Changed 22 months ago by derseppel

Replying to aaronsmiley:

Hey there, thank you guys for making the software and creating a /S option for software packaging!

I'm currently trying to package this for a University lab image, and I can't figure out how to suppress the prompt for VC++. I have no problem making sure the dependencies are there in advance. Is there some way I can suppress this message so the software will install silently?

Thank you again!

Aaron

Which Version are you using? I stuck on Version 7.0. With this Version it is sufficient to install VC++ 2010 in advance. Maybe you need the exact VC++ version?

Last edited 22 months ago by derseppel (previous) (diff)

comment:21 Changed 22 months ago by aaronsmiley

Thanks for the reply - sorry I forgot to mention I’m using the latest stable - 7.2.2. I’ve tried uninstalling and reinstalling once the redistributables are installed, and it still prompts (even though it works fine if I cancel the install at that point). I’ve tried installing them first in the packaging process, (it looks like it’s 2013 and 2015 that are most important ones), and every form of suppression I know of.

It sounds like fixing this isn’t easy, and/or the developers don’t see a one-size-fits-all solution. I can’t suggest a solution as I don’t know how difficult it is to develop this software, but for the folks who need a silent option to streamline packaging for large organizations, it would be really nice to have a way to make it silent.

comment:22 in reply to:  21 Changed 22 months ago by hellik

Replying to aaronsmiley:

It sounds like fixing this isn’t easy, and/or the developers don’t see a one-size-fits-all solution.

winGRASS is based upon the OSGeo4W environment.

as you can see in OSGeo4W 32bit MS runtimes or OSGeo4W 64bit MS runtimes, these are the msvcrt needed to run winGRASS, and there are differences between 32bit and 64bit. GRASS dependencies are sometimes updated/recompiled with newer VC++ versions, then new msvcrt dependencies are added.

it's really hard to test which msvcrt are available or already installed on win 7, 8 or 10 boxes. MS windows doesn't provide a systematic way to test/check this.

as already mentioned in some comments above, there are some NSIS functionalities to skip some installer steps when /S mode. code snippets/PR are very welcome.

comment:23 Changed 22 months ago by derseppel

This bug is more than 2 years old and nothing happend.

I can't imagine that it is that hard to implement an if statement that checks the /S parameter and skips the VC++ installation.

Sorry for being grumpy. I don't know the code and have never done things like this. Just doing some batch and powershell scripting.

Does the Installer write an install.log? If so where can I find it? You could check which is the last line before VC++ gets installed and kill the Install-Process when this line is reached. Grass Gis is successfully installed before.

comment:24 in reply to:  23 ; Changed 22 months ago by aaronsmiley

Replying to hellik:

as already mentioned in some comments above, there are some NSIS functionalities to skip some installer steps when /S mode. code snippets/PR are very welcome.

Sorry I'm not too familiar with NSIS, but at a first glance it sounds like I can use it to make an installer for the installer so I can make a deployment package to install silently? I will check that out.

Replying to derseppel:

I don't know the code and have never done things like this. Just doing some batch and powershell scripting.

Same. We use the PowerShell? App Deployment Toolkit to silently install an array of packages for different campuses throughout the state via SCCM, and to streamline lab machine imaging. If I manage to make this silent I will let you know. Sorry you've been waiting so long for a fix, that must be frustrating.

comment:25 in reply to:  24 Changed 22 months ago by hellik

Replying to aaronsmiley:

Sorry you've been waiting so long for a fix, that must be frustrating.

keep in mind, the winGRASS installer was done in voluntary work.

comment:26 in reply to:  24 ; Changed 22 months ago by derseppel

Replying to aaronsmiley:

Sorry I'm not too familiar with NSIS, but at a first glance it sounds like I can use it to make an installer for the installer so I can make a deployment package to install silently? I will check that out.

Nope. The "WinGRASS-7.2.2-1-Setup-x86.exe" is a NSIS Installer (http://nsis.sourceforge.net). The maintainer/volunteer of the installer has to take a look for this NSIS functionalities.

Our last line is AdminStudio?. With this you can repackage Installations like this to make MSI installers. But its everything but cheap!

Sorry you've been waiting so long for a fix, that must be frustrating.

Luckily no customer asked for e newer version till now... -.-

comment:27 Changed 22 months ago by sbl

Would it be an option for you to use the OSGeo4W command line installation:
https://trac.osgeo.org/osgeo4w/wiki/CommandLine
? That works nicely for me and you can choose which extra packages you like to install ++

Just a suggestion instead of bothering with an /S flag...

comment:28 in reply to:  27 Changed 22 months ago by aaronsmiley

Replying to sbl:

Would it be an option for you to use the OSGeo4W command line installation:
https://trac.osgeo.org/osgeo4w/wiki/CommandLine
? That works nicely for me and you can choose which extra packages you like to install ++

Just a suggestion instead of bothering with an /S flag...

Now that looks promising. I will try that. Thank you for the suggestion!

Replying to hellik:

Replying to aaronsmiley:

Sorry you've been waiting so long for a fix, that must be frustrating.

keep in mind, the winGRASS installer was done in voluntary work.

Of course! I do believe I said thank you in comments above. I just came here because I saw /S wasn't silent and was hoping for a bug fix. It's clear that this will not be fixed.

Thank you again for your contributions regardless.

comment:29 in reply to:  26 Changed 22 months ago by neteler

Replying to derseppel:

Luckily no customer asked for e newer version till now... -.-

An option is also to finance the development of a specific task which isn't possible in a short time frame based on volunteer work.

comment:30 in reply to:  27 ; Changed 22 months ago by aaronsmiley

Replying to sbl:

Would it be an option for you to use the OSGeo4W command line installation:
https://trac.osgeo.org/osgeo4w/wiki/CommandLine
? That works nicely for me and you can choose which extra packages you like to install ++

Just a suggestion instead of bothering with an /S flag...

For the reference of IT guys from the future, (boy I hope the future is awesome), this suggestion totally works. Here's the command I used to install GRASS silently, though obviously it can be changed to suit more purposes:

osgeo4w-setup-x86_64.exe -q -k -P grass -s http://download.osgeo.org/osgeo4w/x86_64/

Happy computing

comment:31 in reply to:  30 Changed 22 months ago by neteler

Replying to aaronsmiley:

For the reference of IT guys from the future, (boy I hope the future is awesome), this suggestion totally works. Here's the command I used to install GRASS silently, though obviously it can be changed to suit more purposes:

osgeo4w-setup-x86_64.exe -q -k -P grass -s http://download.osgeo.org/osgeo4w/x86_64/

Thanks for this great suggestion! Added to

https://grass.osgeo.org/download/software/ms-windows/

comment:32 Changed 21 months ago by neteler

Milestone: 7.0.67.0.7

comment:33 Changed 7 months ago by martinl

Still relevant?

comment:34 in reply to:  33 Changed 7 months ago by hellik

Replying to martinl:

Still relevant?

standalone installer regarding silent mode didn't changed. too many winGRASS dependencies with different needed CRT and too many windows OS flavours doesn't allow a simple fix.

Note: See TracTickets for help on using tickets.