mcerk Posted April 12, 2005 Posted April 12, 2005 OK, I'd like to create a Inno Setup script on the fly. So, what I need is to run a command like this: Dim Quote As String = Microsoft.VisualBasic.ChrW(34) Dim strFile As String = "iscc.exe" Dim Arguments As String = Quote & "myproject.iss" & Quote & " /Q" System.Diagnostics.Process.Start(strFile, Arguments) '/// launch the chm file to view it. but the problem is, that cmd window is shown. How can I silently execute it and read it's exit code? 'Valid options are: "/O" to specify an output path '(overriding any OutputDir setting in the script), '"/F" to specify an output filename (overriding any OutputBaseFilename 'setting in the script), "/Q" for quiet compile (print only error messages), 'and "/?" to show a help screen. 'Example: ' iscc /Q /O"My Output" /F"MyProgram-1.0" "c:\isetup\samples\my script.iss" ' ISCC will return an exit code of 0 if the compile was successful, 1 if the 'command line parameters were invalid or an internal error occurred, 'or 2 if the compile failed. tx Quote
Leaders snarfblam Posted April 12, 2005 Leaders Posted April 12, 2005 Well... In your code you put the filename first then the /Q option, and in the example you provided all of the options came first. Quote [sIGPIC]e[/sIGPIC]
HJB417 Posted April 12, 2005 Posted April 12, 2005 Set the ProcessStartInfo.CreateNoWindow Property. and use the ProcessStartInfo Class to instantiate a Process. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.