0

How to make my C++ Win32 .net-framework installer silent?

I tried sfxmaker software & ussf.exe, but I get an unknown installer error.

Command line arguments /S and /SD did not work for me.

Part of the code I use:

if( !CreateProcess( NULL, 
    ".\\InstallationFiles\\dotnetfx 35 SP1 Full.exe /S",
    NULL,
    NULL, 
    FALSE,
    0, 
    NULL, 
    NULL, 
    &si, 
    &pi ) 
)
Sebastian Mach
  • 38,570
  • 8
  • 95
  • 130
Paul
  • 39
  • 1
  • 9

3 Answers3

4

Did you tried dotnetfx 35 SP1 Full.exe /? ?

The answer is: dotnetfx 35 SP1 Full.exe /Q to start the installer silently.

Also beware of the long name with spaces for CreateProcess, think about quoting the command name. CreateProcess() reference states :

If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin; otherwise, the file name is ambiguous. For example, consider the string "c:\program files\sub dir\program name". This string can be interpreted in a number of ways. The system tries to interpret the possibilities in the following order:

c:\program.exe files\sub dir\program name

c:\program files\sub.exe dir\program name

c:\program files\sub dir\program.exe name

c:\program files\sub dir\program name.exe

Community
  • 1
  • 1
Seki
  • 11,135
  • 7
  • 46
  • 70
  • if( !CreateProcess( ".\\InstallationFiles\\dotNetFx40_Full_x86_x64.exe", /q /norestart",............// first 2 arguments its not working again the installation asks to check boxes.. – Paul Dec 05 '12 at 11:55
  • Did you tried to add quotes around the command name or replace the spaces in the .exe name by underscores? You must have a problem related to long name with space. See my addition. – Seki Dec 05 '12 at 12:32
3

You may be looking for quiet mode. /q. Be careful to check the return code too :)

See this MSDN page to know more.

Gowtham
  • 1,465
  • 1
  • 15
  • 26
  • if( !CreateProcess( ".\\InstallationFiles\\dotNetFx40_Full_x86_x64.exe", /q /norestart",...........// first 2 arguments its not working again the installation asks to check boxes.. – Paul Dec 05 '12 at 11:55
0

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.

Paul
  • 39
  • 1
  • 9