c# - Adding more directory to user selected directory -


so, of right have start process working

private void button3_click(object sender, eventargs e) {     processstartinfo startinfo = new processstartinfo();     startinfo.filename = textbox1.text;     startinfo.arguments = @"-window -usebe -mod=e:\aaron\addons\";     process.start(startinfo); } 

but want other users have work them too. in startinfo.arguments have directory e:\aaron... have textbox display directory of user. directory have replace after -mod= tricky part after directory need folder user has in directory. have add \extrafolder directory. in end become startinfo.arguments = @"-window -usebe -mod= //user input directory\@cba_a3";

you want inject user's directory path? this:

startinfo.arguments =      string.format(@"-window -usebe -mod={0}\@cba_a3", userpathsegment); 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -