Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Win32 installer
how to make my c++ win32 .Net frameworks installer(include 3 exe files) silent,
(paltform: Windows)
 
I tried sfxmaker software & ussf.exe, but i get unknown installer error...
 
command line arguments /S and /SD also not working for me...
 
part of code I use :
 
 if( !CreateProcess( NULL,   // No module name (use command line)
                   ".\\InstallationFiles\\dotnetfx 35 SP1 Full.exe/S",
                   NULL,           // Process handle not inheritable
                   NULL,           // Thread handle not inheritable
                   FALSE,          // Set handle inheritance to FALSE
                   0,              // No creation flags
                   NULL,           // Use parent's environment block
                   NULL,           // Use parent's starting directory
                   &si,            // Pointer to STARTUPINFO structure
                   &pi )           // Pointer to PROCESS_INFORMATION structure
                   )
 

 
Please help,
 
Thanks in advance
Posted 4-Dec-12 5:55am
Don_3316
Edited 5-Dec-12 0:06am
v5
Comments
Richard MacCutchan at 4-Dec-12 11:30am
   
Switch off the sound.
 
Now, if you want a sensible answer try asking a more informative question.
Don_3 at 4-Dec-12 11:41am
   
@richard, haha sounds like you were waiting to say some joke,ok i thought silent installer was known to any one who deals with installers.
 
i am having a c++ win32 installer which installs 3 exe files (.net frameworks), but i dont want my naive users to interact with the installer, by double clicking the installer alone should atlast launch the required application , hope its clear now.
Richard MacCutchan at 4-Dec-12 12:00pm
   
Unless your installer offers messages and choices to the user, I don't see what the problem is.
Don_3 at 4-Dec-12 14:35pm
   
i have removed all those message boxes, i am talking about the next button, i agree radio button..., i found that putting "x.exe /S or /SD" in commandline works, but not working for me,even I tried Sfxmaker, I get unknown Installer type in that,
any one can help...
Richard MacCutchan at 5-Dec-12 3:14am
   
You need to provide a lot more detail (please edit your original question) for anyone to help you. I doubt that anyone can begin to guess what x.exe refers to.
Sergey Alexandrovich Kryukov at 4-Dec-12 11:30am
   
I'm curious why. Installing many times? Installing for many team members?
--SA
Don_3 at 4-Dec-12 11:42am
   
@sergey, pls read above comment hope it will be clear
Sergey Alexandrovich Kryukov at 4-Dec-12 12:06pm
   
Yes, I see. I knew what are silent installations and why, and would always like some to have. I'm only curious why do you call users the "naive users" if they are C++ developers. Naive developers are not useful enough unless they are students/interns who promises to learn and be more useful. Normally, each developer decides independently what subset of MSDN package should be installed at every moment. Some like to be minimalistic, some feel more comfortable to have something extra even if they rarely use it. Decent developers need some freedom and tend not to work in the teem where they are spoon-fed. Still, silent installation is still good, but only when it is customized...
--SA
joshrduncan2012 at 4-Dec-12 13:07pm
   
I would turn off all prompts when creating the installer. (eg in InstallShield).
Don_3 at 4-Dec-12 14:35pm
   
i have removed all those message boxes, i am talking about the next button, i agree radio button..., i found that putting "x.exe /S or /SD" in commandline works, but not working for me,even I tried Sfxmaker, I get unknown Installer type in that,
any one can help...
Don_3 at 5-Dec-12 4:48am
   
users are never c++ develpers, I know what I said, its right, please dont divert the question, i hope my question is clear now(edited question).
Sergey Alexandrovich Kryukov at 5-Dec-12 8:13am
   
To me, this is clear, but please allow me to discuss the topic I find appropriate, OK?
--SA
Jochen Arndt at 5-Dec-12 5:21am
   
Is the dotnetfx package from Microsoft?
Then you should try the '/q' (quiet) option.
 
The option must be separated from the executable file. When the path of the executable contains spaces like in your case, pass the path as first parameter to CreateProcess() and the options using the second parameter.
Don_3 at 5-Dec-12 6:47am
   
thanks so much Jochen, let me try,
 
if( !CreateProcess( ".\\InstallationFiles\\dotNetFx40_Full_x86_x64.exe",
/q /norestart",..................// first 2 arguments
 
its working...,
 
NOTE: but friends you will not see any improvement on the desk, check task manager to view it
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I got it, Thanks to all,
My solution is:
 
if( !CreateProcess ( NULL, // No module name (use command line)
".\\InstallationFiles\\dotnetfx35SP1Full.exe /q /norestart /ChainingPackage ADMINDEPLOYMENT",... // I mentioned only 2 arguments.
 
Check this too:
http://msdn.microsoft.com/en-us/library/ee390831(v=vs.100).aspx[^]
 

NOTE: but friends you will not see any improvement on the desk, check task manager to view it.
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is really not practical (or maybe even doable) in today's systems... main reason is that most systems run most applications under lower permission levels even if the user is an administrator. This of course is for safety reasons, but the implication of this is that anything that has to do changes to the system (either registry or system folders) has to ask for permission from the user explicitly. As you can see, it becomes almost impossible to make an installer "silent" under those conditions.
 
This applies to both modern Windows and Linux systems.
  Permalink  
Comments
Don_3 at 4-Dec-12 14:35pm
   
i have removed all those message boxes, i am talking about the next button, i agree radio button..., i found that putting "x.exe /S or /SD" in commandline works, but not working for me,even I tried Sfxmaker, I get unknown Installer type in that,
any one can help...
Albert Holguin at 4-Dec-12 15:33pm
   
Is this an application that you developed or a third party application? ...I don't know what buttons you are referring to.
Sergey Alexandrovich Kryukov at 4-Dec-12 14:52pm
   
Good point, but this is not the excuse for not having silent installation. The whole installation/script application can be executed under the account with sufficient permissions or with elevated permission (Windows 7): "Run as Administrator" or sudo (most typical for Linux). I only question some social/administrative aspect, when it comes to development tools, as it should be up to each developer who can have own installation, and only could get assistance with it. All developers can use somewhat different tools and they should be given this opportunity if they want.
--SA
Nelek at 4-Dec-12 17:06pm
   
You should tell that to our IT-department. They have installed an intern software in all Laptops of the firm without saying anything or having to click anything as user on my laptop.
Consequence: Energy management changed without notice, my SSD was freezing every 20 minutes I didn't touch the keyboard, when windows wanted to "shut down hard drive". One week working at customers' facility, without being able to deactivate it.
Sergey Alexandrovich Kryukov at 5-Dec-12 8:15am
   
IT sometimes play inappropriate roles, usually having no qualification in development. This is a real organizational problem.
--SA
Albert Holguin at 5-Dec-12 10:09am
   
There's an easy way to do this when a computer is part of a domain... be ware of your IT personnel...lol
Nelek at 5-Dec-12 16:33pm
   
I know... and that's what I am afraid of ;P
Albert Holguin at 5-Dec-12 16:36pm
   
To this very day... I refuse to join the domain at work...lol

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 Mathew Soji 195
4 Richard MacCutchan 145
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,712
2 DamithSL 5,461
3 Manas Bhardwaj 4,916
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 5 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100