Search : in
By :

"Remote Access"

Last answer on Dec 2, 2008 7:28:47 am GMT pushkar, on Nov 29, 2008 11:18:44 am GMT 
 Report this message to moderators

Hello,
hiii,

I want to remotely access the System details, actually i have found lots of server -client code.. but i want the java code for remotely accessing the system information in a LAN.I want the Java code so that i can easily monitor all the systems without any client side code or without installing any client side agent...is that possible....
i know that through WMI we can fetch each and every detail of the System...but i dont know how to connect to WMI using java code...if u cud help me..plz help me out.....

Configuration: Windows XP
Internet Explorer 6.0

Best answers for « "Remote Access" » in :
Do you need a fix IP for remote connection? ShowDo you need a fix IP for remote connection? Myth Truth How does it work? An Internet Service Provider will usually provide a user with a fix IP address that cannot be changed by the user himself. This number is used by another...
Installing a SSH server on Ubuntu ShowInstalling a SSH server on Ubuntu Installation Connection An ssh server allows you to remotely access your machine. You'll have access to the remote console (equivalent to telnet, but secure) and the transfer of files (equivalent...
X11 window managers ShowWindow managers AfterStep Blackbox FluxBox FVWM Unlike some Windows and Mac Based solutions (operating systems),the possibility to choose a window manager is endemic to GNU\Linux. The window manager is managed by the graphics...
Remote attacks ShowRemote attacks and intrusions More and more people spend their time connecting to other people's computers via the Internet. Some people do it out of pleasure, but most of the time the people using this type of technique are looking to introduce...
Installing a VPN server on XP ShowInterest of a VPN Setting up a virtual private network allows you to connect remote computers in a secure fashion via an unreliable (Internet) connection, as if they were on the same LAN. This procedure is used by many companies in order to allow...
Random access memory (RAM or PC memory) ShowTypes of random access memory There are generally two broad categories of random access memory: DRAM memories (Dynamic Random Access Module), which are inexpensive. They are used essentially for the computer's main memory SRAM memories (Static...

1

 GiantLeap, on Dec 2, 2008 7:28:47 am GMT
  • +2

Just enable "Remote Assistance" on your client PCs and use your "Remote Desktop" to access them

or use WMI through CreateObject as given at WMI Scripting http://msdn.microsoft.com/en-us/library/aa393262(VS.85).aspx

[sRegTypes = new Array(
    "                              ",    // 0
    "REG_SZ                        ",    // 1
    "REG_EXPAND_SZ                 ",    // 2
    "REG_BINARY                    ",    // 3
    "REG_DWORD                     ",    // 4
    "REG_DWORD_BIG_ENDIAN          ",    // 5
    "REG_LINK                      ",    // 6
    "REG_MULTI_SZ                  ",    // 7
    "REG_RESOURCE_LIST             ",    // 8
    "REG_FULL_RESOURCE_DESCRIPTOR  ",    // 9
    "REG_RESOURCE_REQUIREMENTS_LIST",    // 10
    "REG_QWORD                    ");    // 11

HKLM = 0x80000002;
sRegPath = "SYSTEM\\CurrentControlSet\\Services\\Eventlog\\System";

try
{
    // VBScript: Set oLoc = CreateObject("WbemScripting.SWbemLocator")
    // JScript:
    oLoc = new ActiveXObject("WbemScripting.SWbemLocator");

    // VBScript: Set oSvc = oLoc.ConnectServer(null, "root/default")
    // JScript:
    oSvc = oLoc.ConnectServer(null, "root\\default");
    
    // VBScript: Set oReg = oSvc.Get("StdRegProv")
    // JScript:
    oReg = oSvc.Get("StdRegProv");
        

    //-------------------------------------------------------------
    // VBScript: E = oReg.EnumValues(HKLM, RegPath, sNames, aTypes)
    // JScript:
    oMethod = oReg.Methods_.Item("EnumValues");
    
    oInParam = oMethod.InParameters.SpawnInstance_();
    oInParam.hDefKey = HKLM;
    oInParam.sSubKeyName = sRegPath;
    oOutParam = oReg.ExecMethod_(oMethod.Name, oInParam);
    
    aNames = oOutParam.sNames.toArray();
    aTypes = oOutParam.Types.toArray();
    //-------------------------------------------------------------

    for (i = 0; i < aNames.length; i++)
        WScript.Echo("Type: ", sRegTypes[aTypes[i]],
            " KeyName: ", aNames[i]);
    
    // VBScript: E = oReg.GetMultiStringValue( _
    //     HKLM, RegPath, "Sources", sValues)
    // JSCript:
    oMethod = oReg.Methods_.Item("GetMultiStringValue");
    oInParam = oMethod.InParameters.SpawnInstance_();
    oInParam.hDefKey = HKLM;
    oInParam.sSubKeyName = sRegPath;
    oInParam.sValueName = "Sources";
    
    oOutParam = oReg.ExecMethod_(oMethod.Name, oInParam);
    
    aNames = oOutParam.sValue.toArray();
    //------------------------------------------------------------

    for (i = 0; i < aNames.length; i++)
        WScript.Echo("KeyName: ", aNames[i]);
}
catch(err)
{
    WScript.Echo("Error occurred\nCode: " + hex(err.number) + 
                          "Description: " + err.description);
}

//User-defined function to format error codes. 
//VBScript has a Hex() function but JScript does not.
function hex(nmb)
{
    if (nmb > 0)
        return nmb.toString(16);
    else
        return (nmb + 0x100000000).toString(16);
}

Reply to GiantLeap