Paul
Paul

Reputation: 39

How to start the .Net framework installer silently?

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 ) 
)

Upvotes: 0

Views: 3606

Answers (3)

Paul
Paul

Reputation: 39

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.

Upvotes: 0

Seki
Seki

Reputation: 11465

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

Upvotes: 4

Gowtham
Gowtham

Reputation: 1475

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

See this MSDN page to know more.

Upvotes: 3

Related Questions