Hi everybody,
I need to retrieve data in the registry.
In order to do that I have got this type of code (example for REG_DWORD) :
outParam = wmiRegistry.InvokeMethod("GetDWORDValue", inParam, null);
if ((uint)outParam["ReturnValue"] == 0)
div1.InnerHtml += outParam["uValue"].ToString() + "<br...
Hi everybody,
I need to have a list of all the subkeys and data (with the type) of a specified key.
I know how to list the subkeys :
string Machine = mymachine;
string KeyPath = @"HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\6.0\Installer"; //for example
//Creation of the...
Hi ca9msm,
Thanks very much for your answer.
This was exactly what I needed.
I am now trying the example available in MSDN (with obviously security issues :P).
Thanks again.
Olivier
Hi ca8msm,
Thanks very much for your answer.
I have already worked with Microsoft.Win32 on my computer. But I have not found anywhere (MSDN, forums...) an example to access to the registry of another computer.
I am sure it may be complicated but it was possible with the old VB (or in Java).
Does...
Hi everybody,
Does anybody have an example to read a registry key of a distant server from an ASP.NET page?
I do not find any on the web... (?)
Thanks very much for any help.
Regards.
Olivier
Re-
The path to the directory I want to upload a file is
"\\myserver\myvirtualdirectory" with
"myvirtualdirectory" like this :
"X\Y\Z".
NETWORK SERVICE has Full Control on the folders Y and Z but not X (the user NETWORK SERVICE does not exist as an X's user).
Thanks for your help.
Olivier :)
Thanks ca8msm!
Now the hyperlinks are working.
Here is my code if someone needs it :
protected void Page_Load(object sender, EventArgs e)
{
DirectoryInfo theFolder = new DirectoryInfo(@"\\myserver\myvirtualdirectory");
string Attachment = "";
foreach (FileInfo nextFile in...
Thanks ca8msm,
When I am trying to execute this :
protected void Page_Load(object sender, EventArgs e)
{
DirectoryInfo theFolder = new DirectoryInfo(@"http://myserver/C$/TEMP/Server_Attachments/6/");
string Attachment = "";
foreach (FileInfo nextFile in theFolder.GetFiles())
{
Attachment +=...
Thanks florens,
It does not work.
I am working inside a domain where the ASPNET account does not exist.
So I can not add it to the folder's users. :(
Thanks!
Hi,
Here is my very simple program :
Code behind :
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using...
Hi,
I have a very very simple code :
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
namespace test
{
class Program
{
static void Main(string[] args)
{
RegistryKey hklm = Registry.LocalMachine;
RegistryKey hkSoftware =...
Hi,
Here is my code :
using System;
using System.Security;
using System.Security.Permissions;
using System.Collections;
using Microsoft.Win32;
class Reg
{
RegistryPermission readPerm1 = new RegistryPermission(RegistryPermissionAccess.Read, "HKEY_LOCAL_MACHINE");
public static void...
Hi,
Thanks very much indeed both of you.
Your combined help was very useful.
Here is what I have done if someone has the same problem :
<asp:TemplateField HeaderText="Server Name" SortExpression="ServerName">
<HeaderStyle horizontalalign="Left" verticalalign="Middle"/>
<ItemStyle...
Hi Isadore,
Thanks very much for your answer.
Actually, I was wondering if I could do that with a GridView databound from an SQLDataSource.
Here is my code :
<asp:GridView CellSpacing="0" ID="GridViewResults" runat="server" AllowSorting="True" AutoGenerateColumns="False"...
Hello,
I have got a GridView with some columns and a Select column on the left with the Select hyperlink.
I want to delete the Select column and bind the Select command to the first column ("Name" for example) so that the user click on a Name to select a row rather than on the Select...
Hello,
I am using arguments through my pages via the URL.
I have got a menu bind with a .sitemap file in each page.
I do not know how to use the URL's arguments with these controls.
Thanks for your help.
-- Olivier --
Hi,
Many thanks for your help.
Does someone know why the Menu control refresh the page without keeping the ViewState of all the other controls?
Is there a possibility to avoid that?
Thanks.
-- Olivier --
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.