i am not really a programmer, so i have a question on the
system.io.directory.exists
what i am trying to do is have a button, once this button is clicked
it checks to see if the Directory exists, if it does it posts a
message saying software already installed. if not i want to launch the
software from a website to install the appplication. here is what i
have so far.
private void button1_Click(object sender, EventArgs e)
{
if (System.IO.Directory.Exists(@"c:\Path"))
System.Console.WriteLine("Already Installed");
else
System.Diagnostics.Process.Start("Program", "web
Location");
} 9 6181
Hi,
You first have to download the software install file and only then you use
Process.Start
--
Ignacio Machin www.laceupsolutions.com
Mobile & warehouse Solutions.
<sh*****@ddpa.orgwrote in message
news:11**********************@y27g2000pre.googlegr oups.com...
>i am not really a programmer, so i have a question on the
system.io.directory.exists
what i am trying to do is have a button, once this button is clicked
it checks to see if the Directory exists, if it does it posts a
message saying software already installed. if not i want to launch the
software from a website to install the appplication. here is what i
have so far.
private void button1_Click(object sender, EventArgs e)
{
if (System.IO.Directory.Exists(@"c:\Path"))
System.Console.WriteLine("Already Installed");
else
System.Diagnostics.Process.Start("Program", "web
Location");
}
On Oct 16, 2:25 pm, shug...@ddpa.org wrote:
i am not really a programmer, so i have a question on the
system.io.directory.exists
Well, you've given some code - but what's your actual question? And is
this within a web form or WinForms?
Jon
Well, if you want to perform a download, you are going to have to use
the WebClient, or the HttpWebRequest/HttpWebResponse classes in the
System.Net namespace.
However, I would suggest that you look into ClickOnce, as it does pretty
much everything you are looking to have it do already.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<sh*****@ddpa.orgwrote in message
news:11**********************@y27g2000pre.googlegr oups.com...
>i am not really a programmer, so i have a question on the
system.io.directory.exists
what i am trying to do is have a button, once this button is clicked
it checks to see if the Directory exists, if it does it posts a
message saying software already installed. if not i want to launch the
software from a website to install the appplication. here is what i
have so far.
private void button1_Click(object sender, EventArgs e)
{
if (System.IO.Directory.Exists(@"c:\Path"))
System.Console.WriteLine("Already Installed");
else
System.Diagnostics.Process.Start("Program", "web
Location");
}
On Oct 16, 8:40 am, "Jon Skeet [C# MVP]" <sk...@pobox.comwrote:
On Oct 16, 2:25 pm, shug...@ddpa.org wrote:
i am not really a programmer, so i have a question on the
system.io.directory.exists
Well, you've given some code - but what's your actual question? And is
this within a web form or WinForms?
Jon
This is in a windows form,
what i am trying to get at is, if the directory already exists within
their PC the button does not appear, is the Directory is not there, i
am going to user the Process.start to send then to the download page,
to install the program.
<sh*****@ddpa.orgwrote:
On Oct 16, 8:40 am, "Jon Skeet [C# MVP]" <sk...@pobox.comwrote:
On Oct 16, 2:25 pm, shug...@ddpa.org wrote:
i am not really a programmer, so i have a question on the
system.io.directory.exists
Well, you've given some code - but what's your actual question? And is
this within a web form or WinForms?
This is in a windows form,
what i am trying to get at is, if the directory already exists within
their PC the button does not appear, is the Directory is not there, i
am going to user the Process.start to send then to the download page,
to install the program.
If the button doesn't appear at all, then you can't react to the click
event. It sounds like you need to tell us a bit more of the bigger
picture, and in particular what problems you're having.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
On Oct 16, 12:40 pm, Jon Skeet [C# MVP] <sk...@pobox.comwrote:
<shug...@ddpa.orgwrote:
On Oct 16, 8:40 am, "Jon Skeet [C# MVP]" <sk...@pobox.comwrote:
On Oct 16, 2:25 pm, shug...@ddpa.org wrote:
i am not really a programmer, so i have a question on the
system.io.directory.exists
Well, you've given some code - but what's your actual question? And is
this within a web form or WinForms?
This is in a windows form,
what i am trying to get at is, if the directory already exists within
their PC the button does not appear, is the Directory is not there, i
am going to user the Process.start to send then to the download page,
to install the program.
If the button doesn't appear at all, then you can't react to the click
event. It sounds like you need to tell us a bit more of the bigger
picture, and in particular what problems you're having.
--
Jon Skeet - <sk...@pobox.com>http://www.pobox.com/~skeet Blog:http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
>From the Code i posted, nothing happens not even going out to the
website i selected from the process.start event. i do not even get the
message.
this by itself works fine in association to the button------>
System.Diagnostics.Process.Start("Program", "web Location");
the moment i add the code to check the system directory, i get no
error but i get no response from the button either.
so my objective is to check the system root for a specific set of
folders. if those folders exist then the button should not appear. if
the directory is missing, the button should show up and then take me
to the web address i have suppled.
the reason i have placed the message in the dialog box is cause i
wanted to make sure it was working, before i figured how to only
display the button if the directory is not there.
<sh*****@ddpa.orgwrote:
From the Code i posted, nothing happens not even going out to the
website i selected from the process.start event. i do not even get the
message.
this by itself works fine in association to the button------>
System.Diagnostics.Process.Start("Program", "web Location");
the moment i add the code to check the system directory, i get no
error but i get no response from the button either.
I suggest you run this in the debugger, and put a breakpoint at the
start of the event handler - then you can see what's going on.
so my objective is to check the system root for a specific set of
folders. if those folders exist then the button should not appear. if
the directory is missing, the button should show up and then take me
to the web address i have suppled.
the reason i have placed the message in the dialog box is cause i
wanted to make sure it was working, before i figured how to only
display the button if the directory is not there.
You haven't got a dialog box - you've got output to the console. If you
were expecting a dialog box, that's probably what's wrong.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
On Oct 16, 4:48 pm, Jon Skeet [C# MVP] <sk...@pobox.comwrote:
<shug...@ddpa.orgwrote:
From the Code i posted, nothing happens not even going out to the
website i selected from the process.start event. i do not even get the
message.
this by itself works fine in association to the button------>
System.Diagnostics.Process.Start("Program", "web Location");
the moment i add the code to check the system directory, i get no
error but i get no response from the button either.
I suggest you run this in the debugger, and put a breakpoint at the
start of the event handler - then you can see what's going on.
so my objective is to check the system root for a specific set of
folders. if those folders exist then the button should not appear. if
the directory is missing, the button should show up and then take me
to the web address i have suppled.
the reason i have placed the message in the dialog box is cause i
wanted to make sure it was working, before i figured how to only
display the button if the directory is not there.
You haven't got a dialog box - you've got output to the console. If you
were expecting a dialog box, that's probably what's wrong.
--
Jon Skeet - <sk...@pobox.com>http://www.pobox.com/~skeet Blog:http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
that is what i though the:
System.Console.WriteLine("Already Installed");
does. meaning i though a pop would be induced from that command. what
would be the command to cause a pop state the response i want.
On Oct 17, 1:27 pm, shug...@ddpa.org wrote:
<snip>
that is what i though the:
System.Console.WriteLine("Already Installed");
does.
No, that writes to the system console - which may not be attached to
that anything for that process.
meaning i though a pop would be induced from that command. what
would be the command to cause a pop state the response i want.
MessageBox.Show.
Jon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Matthias Ludwig |
last post by:
I'm trying to create a directory on the web server with a
vb.net code:
....
Dim dirName As String = "w:\filepath\images"
If Not Directory.Exists(dirName) Then...
|
by: Siemel Naran |
last post by:
Hi. I'm writing a command shell that reads commands from standard input.
At this point I have the command in a std::string. Now I want to execute
this command in the shell. From the Borland...
|
by: Zeno Lee |
last post by:
I'm using File.Exists to test a file on my C: drive.
My program was strongly named and had caspol -af run on it to allow it to
run from the network.
There are 3 ways I am doing this:
1) Run...
|
by: Chad Crowder |
last post by:
Getting the following error on my production server whether the file exists
or not:
"System.IO.IOException: Cannot create a file when that file already exists."
Here's the code generating the...
|
by: Elmo Watson |
last post by:
Is there a way, with the System.IO class, to do a recursive list of a
directory structure?
For instance, in DirectoryInfo, you have GetDirectories and GetFiles ....
In Directory, you have...
|
by: rcolby |
last post by:
Evening,
Wondering if someone can point me in the right direction, on how I would
compare a system.guid with a system.byte.
system.guid (pulled from sql server table with a data type of...
|
by: Philip Wagenaar |
last post by:
I have a Windows Form application that monitors a directory using the
System.IO.FileSystemWatcher.
On the event created I run a sub that sends an xml file over http to a
service.
When I copy...
|
by: adamrobillard |
last post by:
I am very new to vb.net and am using Visual Basic 2005 Express Edition.
This is my function that essentially looks at a directory to see if it
is valid:
'Local variables
Dim sDirectory As...
|
by: Brandon McCombs |
last post by:
Hello,
From my understanding, DirectoryEntry is used to connect to Active
Directory. Although this makes no sense whatsoever I accept it. The
problem is how am I supposed to test whether a...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made but the http to https rule only works for...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
header("Location:".$urlback);
Is this the right layout the...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
| |