Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Shelling In C#


  • Please log in to reply
25 replies to this topic

#1 Wolfy87

Wolfy87

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 28 August 2008 - 08:06 AM

I knew how to shell in VB and now ive just learnt how to do it in C# but now my proc.Start(); line highlights itself when i debug. It works fine on this one...
private void button1_Click(object sender.EventArgs e)
{
System.Diagnostics.Process proc = new System.Diagnostics.process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName="mbam.exe";
proc.Start();
}
But i have that writen 2 more times underneith it and assigned to 2 more buttons but in the other 2 wont work?

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:38 PM

Posted 28 August 2008 - 09:15 AM

What do you mean by "shelling?"

#3 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 28 August 2008 - 09:28 AM

Running a program on your local hard drive via button click like when you click a button then the internet pops up on a certan website which i know how to do now but i dont know why the otther two wont work. its not like ive made a typing error i read it through about 7 times and it seems fine just proc.Start(); gets highlited on the second and third one when it is debuged but the first one works fine...

Edited by Wolfy87, 28 August 2008 - 09:29 AM.


#4 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 28 August 2008 - 11:34 AM

Im sory ive found the real problem i didnt realise at first heres whats wrong...
//
// Install
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Green;
this.ClientSize = new System.Drawing.Size(266, 127);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.richTextBox1);
this.Name = "Install";
this.ShowIcon = false;
this.Text = "Install";
this.Load += new System.EventHandler(this.Install_Load); <<<<<<<< Install_Load is underligned...
this.ResumeLayout(false);

There is obviosly more code than this but this is the problem...whats wrong with Install_Load?

Edited by Wolfy87, 28 August 2008 - 11:37 AM.


#5 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:38 PM

Posted 28 August 2008 - 01:27 PM

It appears to me that you are not calling the function correctly. Functions take parameters, even if it is an empty set of parameters. I am guessing that your function call should be something like:
(this.Install_Load())
instead of:
(this.Install_Load)

Without seeing the rest of the code, I couldn't say. You really need to learn how to use functions though, otherwise you are not going to get very far. When you get to college, you are going to be expected to find the answers on your own.

#6 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 28 August 2008 - 02:37 PM

Ok i see thankyou :thumbsup: i cant belive i didnt think of that though ive proboly used it 64 times today but the computer usually dose this bit of code for me (i meen the bit that will determins what the forms like) ah well thank you very much.

Edited by Wolfy87, 28 August 2008 - 02:49 PM.


#7 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 28 August 2008 - 06:06 PM

i havent had a chance to test it yet but i see no reason as to why it wont work now, thanks.

#8 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 29 August 2008 - 03:01 PM

Ok i tryed it and it poo poo'd it again...

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Green;
this.ClientSize = new System.Drawing.Size(266, 127);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.richTextBox1);
this.Name = "Install";
this.ShowIcon = false;
this.Text = "Install";
this.Load += new System.EventHandler(this.Install_Load());
this.ResumeLayout(false);

What is wrong with this thing? :thumbsup:

#9 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:38 PM

Posted 29 August 2008 - 04:02 PM

Since we are no able to read your mind, could you be a bit more specific? Can we se the code for the entire program? That little bit is not enough to tell us anything, like if there even is a function called Install_Load.

#10 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 31 August 2008 - 06:16 AM

Ok i see your point :thumbsup: here we go -.-...
namespace RedAlert
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button2
//
this.button2.BackColor = System.Drawing.Color.Black;
this.button2.Font = new System.Drawing.Font("Comic Sans MS", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.ForeColor = System.Drawing.Color.Red;
this.button2.Location = new System.Drawing.Point(12, 33);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(114, 67);
this.button2.TabIndex = 1;
this.button2.Text = "Start";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Comic Sans MS", 9.7F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.Color.Red;
this.label2.Location = new System.Drawing.Point(12, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(230, 19);
this.label2.TabIndex = 4;
this.label2.Text = "If you havent already then Install";
//
// button3
//
this.button3.BackColor = System.Drawing.Color.Black;
this.button3.Font = new System.Drawing.Font("Comic Sans MS", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button3.ForeColor = System.Drawing.Color.Red;
this.button3.Location = new System.Drawing.Point(132, 33);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(114, 67);
this.button3.TabIndex = 5;
this.button3.Text = "Install...";
this.button3.UseVisualStyleBackColor = false;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.ForeColor = System.Drawing.Color.Red;
this.label4.Location = new System.Drawing.Point(12, 103);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(115, 21);
this.label4.TabIndex = 7;
this.label4.Text = "Oliver Caldwell";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Green;
this.ClientSize = new System.Drawing.Size(258, 126);
this.Controls.Add(this.label4);
this.Controls.Add(this.button3);
this.Controls.Add(this.label2);
this.Controls.Add(this.button2);
this.Name = "Form1";
this.ShowIcon = false;
this.Text = "Red Alert";
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Label label4;
}
}

namespace RedAlert
{
partial class Install
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// richTextBox1
//
this.richTextBox1.BackColor = System.Drawing.Color.Black;
this.richTextBox1.Font = new System.Drawing.Font("Comic Sans MS", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.richTextBox1.ForeColor = System.Drawing.Color.Red;
this.richTextBox1.Location = new System.Drawing.Point(12, 12);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(152, 99);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "Ok first you need to install the software that will save your...butt...Click Step" +
" 1 to continue.";
//
// button1
//
this.button1.BackColor = System.Drawing.Color.Black;
this.button1.Font = new System.Drawing.Font("Comic Sans MS", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.Color.Red;
this.button1.Location = new System.Drawing.Point(170, 12);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(84, 29);
this.button1.TabIndex = 1;
this.button1.Text = "Step 1";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.BackColor = System.Drawing.Color.Black;
this.button2.Font = new System.Drawing.Font("Comic Sans MS", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.ForeColor = System.Drawing.Color.Red;
this.button2.Location = new System.Drawing.Point(170, 47);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(84, 29);
this.button2.TabIndex = 2;
this.button2.Text = "Step 2";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.BackColor = System.Drawing.Color.Black;
this.button3.Font = new System.Drawing.Font("Comic Sans MS", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button3.ForeColor = System.Drawing.Color.Red;
this.button3.Location = new System.Drawing.Point(170, 82);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(84, 29);
this.button3.TabIndex = 3;
this.button3.Text = "Step 3";
this.button3.UseVisualStyleBackColor = false;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// Install
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Green;
this.ClientSize = new System.Drawing.Size(266, 127);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.richTextBox1);
this.Name = "Install";
this.ShowIcon = false;
this.Text = "Install";
this.Load += new System.EventHandler(this.Install_Load());
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
}
}
namespace RedAlert
{
partial class Start
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// richTextBox1
//
this.richTextBox1.BackColor = System.Drawing.Color.Black;
this.richTextBox1.Font = new System.Drawing.Font("Comic Sans MS", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.richTextBox1.ForeColor = System.Drawing.Color.Red;
this.richTextBox1.Location = new System.Drawing.Point(12, 12);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(420, 130);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "Lets begin by pressing step 1...And if you havent already then close this and go " +
"and click install on the main window.";
//
// button1
//
this.button1.BackColor = System.Drawing.Color.Black;
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.Color.Red;
this.button1.Location = new System.Drawing.Point(12, 148);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(100, 29);
this.button1.TabIndex = 1;
this.button1.Text = "Step 1";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.BackColor = System.Drawing.Color.Black;
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.ForeColor = System.Drawing.Color.Red;
this.button2.Location = new System.Drawing.Point(118, 148);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(100, 29);
this.button2.TabIndex = 2;
this.button2.Text = "Step 2";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.BackColor = System.Drawing.Color.Black;
this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button3.ForeColor = System.Drawing.Color.Red;
this.button3.Location = new System.Drawing.Point(224, 148);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(100, 29);
this.button3.TabIndex = 3;
this.button3.Text = "Step 3";
this.button3.UseVisualStyleBackColor = false;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.BackColor = System.Drawing.Color.Black;
this.button4.Font = new System.Drawing.Font("Comic Sans MS", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button4.ForeColor = System.Drawing.Color.Red;
this.button4.Location = new System.Drawing.Point(330, 148);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(100, 29);
this.button4.TabIndex = 4;
this.button4.Text = "(Coming Soon)";
this.button4.UseVisualStyleBackColor = false;
//
// Start
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Green;
this.ClientSize = new System.Drawing.Size(444, 189);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.richTextBox1);
this.Name = "Start";
this.ShowIcon = false;
this.Text = "Red Alert";
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
}
}

i think thats all of it? but heres the bit i wrote...

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RedAlert
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button3_Click(object sender, EventArgs e)
{
//Introduses Install.
Install Install = new Install();
//Shows Install.
Install.Show();
}

private void button2_Click(object sender, EventArgs e)
{
//Introduses Start.
Start Start = new Start();
//Shows Start.
Start.Show();
}
}
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RedAlert
{
public partial class Install : Form
{
public Install()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
//Opens The Malwarebytes website to download.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName="iexplore";
proc.StartInfo.Arguments="http://www.download.com/Malwarebytes-Anti-Malware/3000-8022_4-10804572.html";
proc.Start();
//Changes the text box's text to...
richTextBox1.Text = ("Now install Malwarebytes AntiMalware and install it to a new folder called FallBack. Now click Step 2");
}

private void button2_Click(object sender, EventArgs e)
{
//Opens Spybot S&D website to download.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName="iexplore";
proc.StartInfo.Arguments="http://fileforum.betanews.com/detail/Spybot_Search_and_Destroy/1043809773/1";
proc.Start();
//Changes the text of the text box.
richTextBox1.Text = ("Now install Spybot Search and Destroy to the FallBack Folder. Now Click Step 3.");
}

private void button3_Click(object sender, EventArgs e)
{
//Opens SUPERANTISPYWAREFREE website to download.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "iexplore";
proc.StartInfo.Arguments = "http://www.superantispyware.com/downloadfile.html?productid=SUPERANTISPYWAREFREE";
proc.Start();
//Changes the text of the text box.
richTextBox1.Text = ("Install it to the Fall Back Folder. Now Click done the file(s) where sucsessfully installed (Well you better hope so).");
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RedAlert
{
public partial class Start : Form
{
public Start()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
//Runs Malwarebytes.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "mbam.exe";
proc.Start();
//Changes the text box's text.
richTextBox1.Text = ("Now select full system scan and scan all of your hard drives like C etc...When this is finished close the program and click Step 2");
}

private void button2_Click(object sender, EventArgs e)
{
//Runs SpyBot Search and Destroy.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "SpybotSD.exe";
proc.Start();
//Changes the text box's text.
richTextBox1.Text = ("Update it first then click scan and when it is done press imunize and then refuse to reboot your computer, if it dose it automatically do not worry, just continue from Step 3");
}

private void button3_Click(object sender, EventArgs e)
{
//Runs SUPERAntiSpyware.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "SUPERAntiSpyware.exe";
proc.Start();
//Changes the text box's text.
richTextBox1.Text = ("Ok select scan your computer/Compleat scan/Select all you hard drives C etc and then scan. When this is finished restart your computer and you should be fine but it may do a boot up scan so dont be allarmed if it dose.");
}
}
}

#11 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:09:38 PM

Posted 31 August 2008 - 08:28 AM

Hello, Wolfy87 and O Groovy One :thumbsup:

Install_Load() does not appear to exist in your code. You're trying to add code to run when the form loads, right?

Maybe you should try using Form.Shown event instead?

You may also override the default constructor for the class and put code in there....

Comment out that line and see if things work as you expect.

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#12 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 31 August 2008 - 08:53 AM

Im quite new to programming but i think i got the jist of what you where saying...i have to change it from _ to . or am i entierly wrong there but ile try what youve said. thanks...

#13 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 31 August 2008 - 09:06 AM

i tryed it with all the possobillitys...and failed i just cant get it right -.- it rejects it every time

#14 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:09:38 PM

Posted 31 August 2008 - 09:18 AM

Change this line:
this.Load += new System.EventHandler(this.Install_Load());
Into
//this.Load += new System.EventHandler(this.Install_Load());

And see if it works as expected.

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#15 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:04:38 AM

Posted 31 August 2008 - 10:55 AM

ok thats working now :thumbsup: but theres still the problem of button1 working but the button 2 and 3 are not...upon click they run a program, button 1 runs malwarebytes anti malware fine but when button 2 or 3 are clicked which are meant to run spybot search and destroy (SpybotSD.exe) and SUPERantiSpyware (SUPERAntiSpyware.exe) it closes the program (in debug mode) and highlights in yello the line of code "proc.Start();" heres the full code of one of them...

private void button2_Click(object sender, EventArgs e)
{
//Runs SpyBot Search and Destroy.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "SpybotSD.exe";
proc.Start();
//Changes the text box's text.
richTextBox1.Text = ("Update it first then click scan and when it is done press imunize and then refuse to reboot your computer, if it dose it automatically do not worry, just continue from Step 3");

proc.Srtart(); is always highlighted where as button1's code is exactly the same but it works...
This is button1's code that DOSE work...

private void button1_Click(object sender, EventArgs e)
{
//Runs Malwarebytes.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "mbam.exe";
proc.Start();
//Changes the text box's text.
richTextBox1.Text = ("Now select full system scan and scan all of your hard drives like C etc...When this is finished close the program and click Step 2");

So can you see anything wrong?
Thanks, Ollie.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users