i am not really a programmer, so i have a question on the
system.io.direc tory.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(o bject sender, EventArgs e)
{
if (System.IO.Dire ctory.Exists(@" c:\Path"))
System.Console. WriteLine("Alre ady Installed");
else
System.Diagnost ics.Process.Sta rt("Program", "web
Location");
} 9 6277
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.o rgwrote in message
news:11******** **************@ y27g2000pre.goo glegroups.com.. .
>i am not really a programmer, so i have a question on the
system.io.direc tory.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(o bject sender, EventArgs e)
{
if (System.IO.Dire ctory.Exists(@" c:\Path"))
System.Console. WriteLine("Alre ady Installed");
else
System.Diagnost ics.Process.Sta rt("Program", "web
Location");
}
On Oct 16, 2:25 pm, shug...@ddpa.or g wrote:
i am not really a programmer, so i have a question on the
system.io.direc tory.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.co m
<sh*****@ddpa.o rgwrote in message
news:11******** **************@ y27g2000pre.goo glegroups.com.. .
>i am not really a programmer, so i have a question on the
system.io.direc tory.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(o bject sender, EventArgs e)
{
if (System.IO.Dire ctory.Exists(@" c:\Path"))
System.Console. WriteLine("Alre ady Installed");
else
System.Diagnost ics.Process.Sta rt("Program", "web
Location");
}
On Oct 16, 8:40 am, "Jon Skeet [C# MVP]" <sk...@pobox.co mwrote:
On Oct 16, 2:25 pm, shug...@ddpa.or g wrote:
i am not really a programmer, so i have a question on the
system.io.direc tory.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.o rgwrote:
On Oct 16, 8:40 am, "Jon Skeet [C# MVP]" <sk...@pobox.co mwrote:
On Oct 16, 2:25 pm, shug...@ddpa.or g wrote:
i am not really a programmer, so i have a question on the
system.io.direc tory.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.co m> 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.co mwrote:
<shug...@ddpa.o rgwrote:
On Oct 16, 8:40 am, "Jon Skeet [C# MVP]" <sk...@pobox.co mwrote:
On Oct 16, 2:25 pm, shug...@ddpa.or g wrote:
i am not really a programmer, so i have a question on the
system.io.direc tory.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.co m>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.Diagnost ics.Process.Sta rt("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.o rgwrote:
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.Diagnost ics.Process.Sta rt("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.co m> 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.co mwrote:
<shug...@ddpa.o rgwrote:
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.Diagnost ics.Process.Sta rt("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.co m>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("Alre ady 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.or g wrote:
<snip>
that is what i though the:
System.Console. WriteLine("Alre ady 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
Directory.CreateDirectory(dirName)
Label1.Text = "Directory created"
Else
|
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 newsgroups I learned that there
is a function in stdlib.h called system.
int system(const char *command);
First question, is the system command ANSI compliant. Because I include
<cstdlib> and write std::system(command.c_str()); it looks like an...
|
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 from my C: drive, File.Exists works properly and says
C:\Temp\test.txt exists
2) Run from my H:\ (network) drive, File.Exists says the file doesn't exist.
3) Run from Visual Studio debugger, with project configuration property
|
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 error (seems to be happening when I try
creating a directory)
If dirmgr.Exists("s:\blah\" & txt_name.Text) Then
lblerror.Text = lblerror.Text & "Unable to build physical path. " &
|
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 Directory.GetFileSystemEntries(path), but I would
like to know how to put this together, knowing which entry is a Subdirectory
and which entry is a file, and make a recursive list of the Directory
structure below a specific path - - -
| |
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
uniqueidentifier, originally taken from objectGUID from active directory
domain)
|
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 7000 files in the directory to be monitored only 123 are sent to
the service.
What might be going wrong?
|
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 System.IO.Directory
'See if path is valid
If sDirectory.Exists(Me.txtFilePath.Text) Then
|
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 connection is active or
not if I can create a DirectoryEntry with whatever data I want since the
data really isn't verified until I try to use it? I am not able to
determine whether the connection is really going to be available until
the Try {}...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |