Click here to Skip to main content
15,913,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My target executable file location is 'C:\Documents and Settings\Administrator\Desktop\MSI Installer\Dependency Setup\SQL Setup\x86\setup' & Filename is 'setupsql.exe'

I want to do that SQL Server is install in silent mode through creating .iss file which located in 'C:\Documents and Settings\Administrator\Desktop\MSI Installer\Dependency Setup\SQL Setup\Unatteded File\setup.iss'

Directly, it is proper run through command prompt(i.e. c:\>)
After the restart the m/c & uninstall MS SQL server from control panel & delete from MS SQL SERVER folder in c:\Programs, those above exe file and .iss file is run through vb.net coding, it is error msg shown. Msg is 'The path specified in command line argument is invalid: C:\Documents and Settings\Administrator\Desktop\MSI Installer\Dependency Setup\SQL Setup\x86\setup\setup.iss'

My code is below :
-----------------
VB
Dim filePathArg As String = "C:\Documents and Settings\Administrator\Desktop\MSI Installer\Dependency Setup\SQL Setup\x86\setup\setupsql.exe -s -fl ""C:\Documents and Settings\Administrator\Desktop\MSI Installer\Dependency Setup\SQL Setup\Unattended File\setup.iss"""

Shell(filePathArg, AppWinStyle.Hide)


How will i solve the above problem through coding?????
Please help me,it's a very impotant to me....
Posted
Updated 30-Dec-11 23:29pm
v2

1 solution

You need to surround all the filenames with quotes. The shell will otherwise execute whatever is before the first space. Try something like this:
Dim filePathArg As String = """C:\Documents and Settings\Administrator\Desktop\MSI Installer\Dependency Setup\SQL Setup\x86\setup\setupsql.exe"" -s -fl ""C:\Documents and Settings\Administrator\Desktop\MSI Installer\Dependency Setup\SQL Setup\Unattended File\setup.iss"""


Good luck!
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900