|
No. And for good reason. Launching an .EXE on a remote machine is a SEVERE security violation. Think about what some idiot virus writer could do with that ability.
|
|
|
|
|
hi,
after i clicked on 'publish' - a SetUp file was created with a group of files added to it.
i want to distribute it in the internet and in order to do that i need only one file.
do i need to use external program to do that or is there a way to do it from inside the .NET ?
are there any recomendations for external programs to use ?
thanks in advance,
avi
|
|
|
|
|
If you're referring to ClickOnce deployment using Visual Studio, then you will need *more* than one file; you will need at least three: the *.application file, the *.manifest file, and your application file.
You can read all about it at ClickOnce Deployment[^]. If you have any problems following their advice, you can post a question here and I'll respond to it.
I've done that ClickOnce thing more than once.... As long as you stick with the wizard, then you should have little problem. But, you need to read about ClickOnce to understand how it works.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
yes , i've allready done that , but in order for someone to download a setup program from the internet he needs one EXE file only to run.
ofcorse i can compress them and ask him to decompress before running setup but this is not professional.
i tried the winzip self exctractor but it seems to be unable to handle subdirectories and thus the setup fails.
|
|
|
|
|
Curtis Schlak. wrote But, you need to read about ClickOnce to understand how it works.
shabya wrote: yes , i've allready done that , but in order for someone to download a setup program from the internet he needs one EXE file only to run.
Are you *sure* that you read it? ClickOnce isn't just a single executable that get's downloaded and runs an installation. It makes a lot of files, but the user doesn't need to download those himself.
Just build an installation using ClickOnce, upload it somewhere, and try the generated installation-procedure. Set back, imagine you're a user, click on the link that ClickOnce gives you, and relax
The reason that it's called "ClickOnce" is that the user only needs to click once to download all required components, install and update them. Do you think that it's more professional to let the user download a single file that needs be extracted and stuff?
I are troll
|
|
|
|
|
Again, I stand agape before your excellent answer!
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I should really learn some social skills. My answer might be correct (which is something to be happy for on it's own account), but it only showed that I know what you are talking about and doesn't motivate to try again.
Your answer does both help and motivate
I are troll
|
|
|
|
|
I've recently returned to the CP forums and I always look forward to reading a reply that ends in "I are troll." Keep up the good work!
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I are troll
|
|
|
|
|
You have confused me with your questions. Let's think about the two scenarios that you've presented so far:- (Your First Post) Using the ClickOnce feature in Visual Studio
- ClickOnce is part of the Windows Installer system and you only need to publish the ClickOnce files to a public Web server or share. Windows installer does the rest. Windows Installer will download and install all of the necessary files. The user only needs to click on a link.
- (This Most Recent Post) Traditional Installation
- The user downloads a setup package that you built using an Installer project or WiX project or InstallShield project or XXX project. That installation executable then unpacks and installs the software on the machine.
These two choices are essentially mutually exclusive, though some scenarios will have you use a local installer to bootstrap a ClickOnce installation. You really need to understand the difference between these distribution options before you can ask questions about them.
My question to you is which one do you want to do: use ClickOnce and let Windows Installer handle everything for your users by using the Publish feature in Visual Studio, or build a traditional installation package that a user can download?
In either case, here are resources for your education:
Again, I point you to ClickOnce Deployment[^].
And, here's an article right here on CodeProject for Visual Studio Windows Application Setup Project[^] by the somewhat prolific kubben[^].
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi ,
i am using AxWebBrowser to launch web page. I dont have control over the web page.I am requesting the server with the url and embeding the page in AxWebBrowser.
my assignment is I have to print the web page from my application. please note i dont have control over the web page.
i googled and find out the following ways of printing the web page:
Case 1:
object o = "";
//// constants useful when printing
SHDocVw.OLECMDID Print = SHDocVw.OLECMDID.OLECMDID_PRINT ;
//// use this value to print with prompting
SHDocVw.OLECMDEXECOPT PromptUser =
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER;
axWebBrowser1.ExecWB(Print, DontPromptUser, ref o, ref o);
In case 1,I could call the print dialog and print the web page content. But I cudnt add extra text to the web page. i couldnt find any solution to add extra text to the web page through ExecWB method.
Case 2:
IHTMLDocument2 HTMLDocument1 = (IHTMLDocument2)axWebBrowser.Document;
object pagedoc = HTMLDocument1.body.document;
string acttext = ((mshtml.HTMLDocumentClass)pagedoc).activeElement.innerHTML;
string headertext = "Sample text to the web page";
string mytext = headertext + acttext;
((mshtml.HTMLDocumentClass)pagedoc).activeElement.innerHTML = mytext;
((mshtml.HTMLDocumentClass)pagedoc).execCommand("Print", true, 0);
In case 2, I am able to prompt the print dialog using ExecCommand method and the print the web page content.
To add extra text the web page content , i took the innerHTML and added sample text and tried printing. My problem with this case is , when i tried to use html tags like "center,h4" , print dialog itslef is not promted. in general print is not working.
Can someone plz help me to resolve this problem. Do i need to give any more information. if so plz tell me.thank you
|
|
|
|
|
Hello,
I would appreciate it if you help me in making a code for the UDP Ping by using the .NET.
|
|
|
|
|
Consider this-
There is a C#.NET project and I have 3 functions- A,B and C
C function will have to calculate the checksum of all three functions at runtime.
How can that be done?? Help please!
|
|
|
|
|
Why? Sign your assemblies and let the runtime do that for you...
|
|
|
|
|
Hi everyone! With one sentence: How can I define startup parameters for a windows service while installing it?
Here is the detailed story which I think that it would be helpful for help
I wrote and installed my custom windows service. I didn’t use the right mouse click to create a service installer instead I derived it from the “Installer” class and wrote it myself. Now I need to use my service sometimes as a windows application. In the main Main() method of my application I made a check for parameters. If there is a parameter called “-ui” it works as a Windows application. If there is not a parameter it checks if it’s already installed into the windows services or not. If not installed then it installs itself and runs. The service/windows application runs well. Now I just want it to run it without a parameter as a Windows application and with a parameter as a service (the total opposite as I am using it right now). So I changed my Main() method for the parameters. With a double click on the exe it runs as windows application. For starting the service now the application is expecting a parameter called “-service” from the command line. The service must also be notified that it can take parameters. By double clicking in the “services” window we can see “Path to executable" (which is the “ImagePath” key in the registry). I modified the value of the “ImagePath” key by hand and the service worked well. Now I want to skip the editing the registry by hand part and automate it. First I tried add the parameter into the assembly location.
this.Context.Parameters["assemblypath"]= Assembly.GetEntryAssembly().Location + " -service";
this modification truly changed the see “Path to executable" of my service in the services window and and “ImagePath” in the registry like this:
“myPath\MyService.exe –service”
but the funny thing was that my service stoped working after the modification. The reason that it was working when I modified the registry by hand was that the ”-service” parameter wasn’t in the double quotes. Instead it was like this.
“myPath\MyService.exe’ –service
I checked several web sites to figure out how to define startup parameters into a windows service and I always came to a code which modified the registry key “ImagePath”.
using (RegistryKey system = Registry.LocalMachine.OpenSubKey("System"))
{
if (system == null)
return;
using (RegistryKey currentControlSet = system.OpenSubKey("CurrentControlSet"))
{
if (currentControlSet == null)
return;
using (RegistryKey services = currentControlSet.OpenSubKey("Services"))
{
if (services == null)
return;
using (RegistryKey service = services.OpenSubKey(KmsService.SERVICE_NAME))
{
string imagePath = service.GetValue("ImagePath") as string;
service.SetValue("ImagePath", imagePath + " -service");
Registry.LocalMachine.Flush();
service.Close();
}
services.Close();
}
currentControlSet.Close();
}
system.Close();
}
But now I got permission issues to write to the registry. How can I solve this problem. Because I can normally write to the registry otherwise it would not write to it in the first place.
In the end thank you in advance…
Sincerely
Mehmet Rasim Inceoglu
|
|
|
|
|
Hi to all.
I created a MSI Setup which contains three Projects
1.Windows Application
2.Windows Service
3.Custom Action Data
The SetUp is Installing and Uninstalling Successfully.Some times if Due to some error while Uninstallation First the Service is Removed and then due to some Problem in Uninstallation it is Stopped at Client System.Then The Setup is Neither Uninstalled nor Installed. As we are Updating the Setup Continuously it is not possible to client to detect the MSI Setup of Version installed in his System and repair. So I removed the Service installation and Uninstallation in Setup and I Handled manually through Custom Action Data.But now another problem started.The Program is Shown as Two Programs in Add/Remove programs.That means it is Not Updating the old version.It is taken as new Program to System.can any one tell me what might be the reason.
I will be very thankful to u as it is Burning issue to me.
Thanks&Regards,
narayana
|
|
|
|
|
Hi to All
I got the solution.By mistake I changed the Upgrade code of SetUp.That is the Problem.
|
|
|
|
|
How can i split a bitmap image imnto 4 equal parts using c#.net
|
|
|
|
|
Bitmap.Clone(Rectangle, PixelFormat)
http://msdn.microsoft.com/en-us/library/ms141944(VS.80).aspx[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
coversion of image into pixel matrix using vb.net
|
|
|
|
|
Decide what you want and stop reposting the same question
|
|
|
|
|
huu... I answared this question last time you asked it...
|
|
|
|
|
Hi,
I am wanted to convert/store a string, which has XML elements, into a dataset or data table. The string that I am reading from a service is the result of my query. I have written the following code,
{
DataSet ds = new DataSet();
StringReader stream = new StringReader(xmlString);
ds.ReadXml(stream);
DataTable dt = ds.Tables[0];
dg.DataSource = dt;
return dt;
}
I am receiving two different type of strings, they are
xmlString1:
<?xml version="1.0" encoding="UTF-8"?>
<nh:rows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nh="http://nhdb">
<nh:urnumber>0123456</nh:urnumber>
<nh:surname>xxxxx</nh:surname>
<nh:forename>yyy</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1958-10-05</nh:dob>
<nh:address>Mxaxixlx</nh:address>
<nh:suburb>Prxxxx</nh:suburb>
<nh:state>Vxxx</nh:state>
<nh:postcode>3072</nh:postcode>
<nh:patientphone>phone</nh:patientphone>
<nh:gender>Female</nh:gender>
<nh:unit>Sxxxxx Oxxxx</nh:unit>
<nh:ward>Bxxx DPxx</nh:ward>
</nh:rows>
xmlString2:
<?xml version="1.0" encoding="UTF-8"?>
<nh:rows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nh="http://nhdb">
<nh:urnumber>0123450</nh:urnumber>
<nh:surname>Cxxxxxx</nh:surname>
<nh:forename>RxxxxxT</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1954-07-19</nh:dob>
<nh:address>'ANNANDALE'</nh:address>
<nh:suburb></nh:suburb>
<nh:state></nh:state>
<nh:postcode></nh:postcode>
<nh:patientphone></nh:patientphone>
<nh:gender>Male</nh:gender>
<nh:unit></nh:unit>
<nh:ward></nh:ward>
<nh:urnumber>0123451</nh:urnumber>
<nh:surname>KROL</nh:surname>
<nh:forename>ANILLA</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1958-12-10</nh:dob>
<nh:address>68A CLARENCE</nh:address>
<nh:suburb></nh:suburb>
<nh:state></nh:state>
<nh:postcode></nh:postcode>
<nh:patientphone></nh:patientphone>
<nh:gender>Female</nh:gender>
<nh:unit></nh:unit>
<nh:ward></nh:ward>
<nh:urnumber>0123452</nh:urnumber>
<nh:surname>GEYER</nh:surname>
<nh:forename>MAUREEN</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1948-06-02</nh:dob>
<nh:address>19 JAYSON</nh:address>
<nh:suburb></nh:suburb>
<nh:state></nh:state>
<nh:postcode></nh:postcode>
<nh:patientphone></nh:patientphone>
<nh:gender>Female</nh:gender>
<nh:unit></nh:unit>
<nh:ward></nh:ward>
</nh:rows>
The above code works perfectly for the xmlString1 and it is converting a data table with single row of data for the cloumns urnumber, surname, forename, middlename, dob, address, suburb,state, postcode,patientPhone, gender, unit, ward.
When I am receiving the xmlString2, the data table is populated with only one column urnumber_Text(for all ur numbers in the xml string).
What am I missing here? Is there any other genuine way of doing it?
Thanks a Lot for your valuable time and invaluable advice.
Looking for advice,
Renu
|
|
|
|
|
Hi,
You need to inject each record fields as child nodes of a parent node i.e. you should generate XML as below:
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<nh:rows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nh="http://nhdb">
<nh:urnumber>0123450</nh:urnumber>
<nh:surname>Cxxxxxx</nh:surname>
<nh:forename>RxxxxxT</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1954-07-19</nh:dob>
<nh:address>'ANNANDALE'</nh:address>
<nh:suburb></nh:suburb>
<nh:state></nh:state>
<nh:postcode></nh:postcode>
<nh:patientphone></nh:patientphone>
<nh:gender>Male</nh:gender>
<nh:unit></nh:unit>
<nh:ward></nh:ward>
</nh:rows>
<nh:rows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nh="http://nhdb">
<nh:urnumber>0123451</nh:urnumber>
<nh:surname>KROL</nh:surname>
<nh:forename>ANILLA</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1958-12-10</nh:dob>
<nh:address>68A CLARENCE</nh:address>
<nh:suburb></nh:suburb>
<nh:state></nh:state>
<nh:postcode></nh:postcode>
<nh:patientphone></nh:patientphone>
<nh:gender>Female</nh:gender>
<nh:unit></nh:unit>
<nh:ward></nh:ward>
</nh:rows>
<nh:rows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nh="http://nhdb">
<nh:urnumber>0123452</nh:urnumber>
<nh:surname>GEYER</nh:surname>
<nh:forename>MAUREEN</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1948-06-02</nh:dob>
<nh:address>19 JAYSON</nh:address>
<nh:suburb></nh:suburb>
<nh:state></nh:state>
<nh:postcode></nh:postcode>
<nh:patientphone></nh:patientphone>
<nh:gender>Female</nh:gender>
<nh:unit></nh:unit>
<nh:ward></nh:ward>
</nh:rows>
</Data>
Regards,
Chandu
|
|
|
|
|
Howdy All,
I'm kicking around the idea of using the CodeDom namespace in an application to allow end users some limited access to scripting (for example to functions in System.Math).
Is anyone aware of any restrictions on the CodeDom in a distributed application? I realize it's already part of the framework, but...I had heard a story about licensing restriction in the old VBScript and was wondering if anyone had heard anything similar with regards to .Net.
A little googling didn't really reveal anything other than some GPL discussion around MONO, but none of it seemed relevant. Maybe I just wasn't using the right search terms...
Anyway, has anyone heard or tried anything along these lines?
|
|
|
|