private void zapisdoinstall() { //zapis do install.bat string[] lines = System.IO.File.ReadAllLines(form.pracovnislozka + @"\konfigurace\install.bat"); string allString = ""; string v = @"net use a: \\" + Ulti.GetLocalIPAddress() + @"\windows /user:"******" " + '"' + textBox3 + '"'; lines[17] = v; for (int i = 0; i < lines.Length; i++) { allString += lines[i] + "\n"; } System.IO.File.WriteAllText(form.pracovnislozka + @"\konfigurace\install.bat", allString); }
private void button3_Click(object sender, EventArgs e) { if (debug == true) { label9.Text = Ulti.GetLocalIPAddress(); this.Size = new Size(980, 500);//Proc groupBox1.Visible = true; debug = false; NastaveniBuhviceho(); } else { this.Size = new Size(980, 350);//??????? groupBox1.Visible = false; debug = true; } }
public Form1() { InitializeComponent(); label1.Text = pracovnislozka; label12.Text = $@"\\{Ulti.GetLocalIPAddress()}\windows"; textBox1.Text = Ulti.GetLocalIPAddress(); label19.Visible = false; ulti = new Ulti(this); path1 = @"./programy"; //adressa pro .bat kopirovani start path2 = @"./programy2"; //adressa pro kopirovani konec-cil string[] dirs = Directory.GetFiles(@"./programy", "*.bat"); checkedListBox1.Items.Clear(); foreach (string item in dirs) { string va = Path.GetFileName(item); checkedListBox1.Items.Add(va); } }
private void NastaveniBuhviceho()//prejmenovat a zkontrolovat mezery { label16.Text = $@"net share windows={pracovnislozka}\soubory\files\windows /grant:{textBox2.Text},READ /users:{numericUpDown1.Value}"; label18.Text = $@"net use a: \\{Ulti.GetLocalIPAddress()}\windows /user:{textBox2.Text}" + '"' + "<vaseheslo>" + '"'; }
private void button4_Click(object sender, EventArgs e) { label9.Text = Ulti.GetLocalIPAddress(); NastaveniBuhviceho(); }
private void button6_Click(object sender, EventArgs e) { textBox1.Text = Ulti.GetLocalIPAddress(); }
private void button5_Click(object sender, EventArgs e) { label12.Text = @"\\" + Ulti.GetLocalIPAddress() + @"\windows"; }