Help - Search - Members - Calendar
Full Version: Shelling In C#
BleepingComputer.com > Software > Programming
   
Wolfy87
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?
groovicus
What do you mean by "shelling?"
Wolfy87
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...
Wolfy87
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?
groovicus
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.
Wolfy87
Ok i see thankyou smile.gif 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.
Wolfy87
i havent had a chance to test it yet but i see no reason as to why it wont work now, thanks.
Wolfy87
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? wacko.gif
groovicus
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.
Wolfy87
Ok i see your point tongue.gif 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.");
}
}
}
Billy O'Neal
Hello, Wolfy87 and O Groovy One smile.gif

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
Wolfy87
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...
Wolfy87
i tryed it with all the possobillitys...and failed i just cant get it right -.- it rejects it every time
Billy O'Neal
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
Wolfy87
ok thats working now smile.gif 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.
Wolfy87
I dont think i have the executible file names right for 2 or 3 but it works for 1 so maby thats the problem...
Billy O'Neal
You need to specify full path names to Process.Start(). Just using the program EXE name will not work.

Billy3
Wolfy87
But the first one is just mbam.exe and it works fine and then when i put the full pathe name (c:program files... etc) it rejects it and underlines in red about 20% of the directory. so it dose work with just the name and .exe file extention but proc.Start(); is highlighted when button 2 or 3 are pressed
Billy O'Neal
In the first example, MbAM placed itself in the %PATH% of the system, so it works.

In the other example, remember that the \ character is special in C(++,#) and needs to be escaped. So the string will be something like "C:\\Program Files\\SomeEXE.EXE"

Remember though... if you're using this for malware diagnostic and things that running an app for this on top of .NET 3.5 means it won't work on the majority of infected systems....

Billy3
Wolfy87
Thankyou smile.gif ile try that now but the program is just meant to be a simple program with links as to where to download theese programs and then links to run them
Wolfy87
Jesus on ice skates! it works lol thankyou so much you have bee a real help ile sign your guest book for sure smile.gif
Billy O'Neal
Glad to hear things are workin for ya.

Do want to note a few things while I'm here..

MSDN is your best refrence for stuff like this, you may find some more stuff in the process class that could help explain some of this here -> http://msdn.microsoft.com/en-us/library/sy...cs.process.aspx

You may wish to use the function here -> http://msdn.microsoft.com/en-us/library/sy...folderpath.aspx to get the location of Program Files dynamically at runtime.

Good luck,
Billy3
Wolfy87
Oh cool! so it will put in the directory no matter where it is on the PC using the program? And would you like me or can i have the pleasure to send you my program...i dont have a clue how maby over Hotmail im not sure but i would love for you to try it out. i am using it my self now on mine, our laptop and my dads laptop and it works perfectly smile.gif.
Hopefully soon i will make some updated vertions so on a countdown timer when it reaches certen times it will run the 3 programs simutainiosly (sorry im not the best speller i have dyslexia :|).
Thank you, Oliver
Billy O'Neal
No, I've got enough stuff on my plate right now.. Lots of HJT logs to do, know what I mean?

Just saying if you run on a machine where Program files is located on the D drive or something you don't want your program to fall on it's face smile.gif

Hmm... would be difficult to run the programs all at once because I don't think consumer apps like that have command line options to force them to scan or anything like that.

Besides, the windows scheduler service already provides that functionality.

Good luck,
Billy3
Wolfy87
I know what you mean by busy corse work and all that lol, but i have conciderd that the C drive may not be the defalt drive for some PC's so thats why im so excited about implementing the Code that gets the directory. and no yu cannot run them all at the same time for they will counteract each other and because they all sort of probe the computer they think each other are trogens, its realy not good tongue.gif
Wolfy87
Ok i was wrong, they can be run in conjuction with each other so thats going down on the note pad for when i update it tongue.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.