Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2007
    Posts
    8

    System Information Gathering Page

    Im trying to put together a page that will giove as much information about the current computer as possible

    All of the memory information available

    All HD and drives (capacity, available)

    LAN info, user info. Everything !

    Im looking for all the info to be displayed in seperate boxes next to labels that explain what they are and for them to be populated automatically when the page open.

    Are there any examples or cheat sheets that I can use. Im moving from AMS 4 and it seemed fairly easy in that program, btu I can't figure it out for AMS 6.

    Thanks in advance,
    Mark

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    yeah, i made an app like that a while ago but i cant seem to find the apz for it,

    its easy enough to do stright from the manual (thats how i did it) but i knock you up a "cheat sheet" lol, tomoz as its late here and im knackerd

    fyi, its just a case of getting the info and putting it in to a read only input object
    eg:

    PHP Code:
    -- this would get the total ammount of system ram
    gRam 
    System.GetMemoryInfo();
    Input.SetText("Input1"gRam.TotalRAM); 
    Open your eyes to Narcissism, Don't let her destroy your life!!

  3. #3
    Join Date
    Jan 2007
    Posts
    8
    I would appreciate it very much.

    I was able to get the memory information completed, im working on the LAN info (although I wish it was more thorough - gateway IP,DNS info, connection type and name...) but what can you do.
    Also, In version 4, the GetDrive information was super handy for getting hard drive capacities.

    Any help would again be very appreciated.

    Mark

  4. #4
    Join Date
    Jan 2007
    Posts
    8
    ONe last question for the night.
    I'm working on outputting the Processor information to a Dialog box, but I'm getting an error when I go to run it

    here is what I have:

    result = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\System\CentralProcessor \0", "ProcessNameString", true);
    Dialog.Message("Registry Data", "The value read from the Registry is "..result..".");
    I get nothing. I did the error code troubleshoot and I get a 1605. 1605 is "Could not get the specified value's data." Could it be because the reg entry begins with a few black spaces ?

    thank you and good night.

    Mark

  5. #5
    Join Date
    May 2006
    Posts
    5,380
    when useing backslashes in ams you always need to use 2 "\\"

    iv attached a example on how to get the CPU id, if you need any more help feel free to ask, i'll work on a lan info example for you a bit later on,
    Last edited by RizlaUK; 02-01-2009 at 11:35 AM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  6. #6
    Join Date
    Mar 2004
    Location
    Toronto, ON CANADA
    Posts
    696
    Here is a bunch of code from an application that I wrote in AMS that gets a lot of information from the computer. See the attached screenshot for a preview of what information this code gathers.

    Code:
    -----------------------------------------------------------------------------------------------------------------------
    -- Function to get the workstation system information
    function fGetComputerInfo()
    	-- Get the processor name and speed
    	sProcessorName = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", "ProcessorNameString", false);
    	if sProcessorName == "" then
    		sProcessorName = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", "VendorIdentifier", false);
    		if sProcessorName == "" then
    			sProcessorName = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", "Identifier", false);
    		end
    	end
    	sProcessorSpeed = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", "~MHz", false);
    	nProcessorSpeed = String.ToNumber(sProcessorSpeed);
    	if nProcessorSpeed >= 1000 then
    		nProcessorSpeedGHz3 = nProcessorSpeed / 1000;
    		nProcessorSpeedGHz = Math.Round(nProcessorSpeedGHz3, 2);
    		sProcessorSpeedPretty = nProcessorSpeedGHz.. "GHz";
    	elseif nProcessorSpeed < 1000 then
    		sProcessorSpeedPretty = nProcessorSpeed.. "MHz";
    	end
    	sProcessorNameTrimmed = String.TrimLeft(sProcessorName, " ");
    	Label.SetText("N_LabelCPUText", sProcessorNameTrimmed.." @ ~"..sProcessorSpeedPretty);
    	-- Get the amount of available memory to Windows
    	tSystemRAMFake = System.GetMemoryInfo();
    	nSystemRAM = Math.Floor((tSystemRAMFake.TotalRAM + 3) / 4) * 4;
    	if nSystemRAM >= 1024 then
    		nSystemRAMGB3 = nSystemRAM / 1024;
    		nSystemRAMGB = Math.Round(nSystemRAMGB3, 1);
    		sSystemRAM = nSystemRAMGB.." GB";
    	elseif nSystemRAM < 1024 then
    		sSystemRAM = nSystemRAM.." MB";
    	end
    	Label.SetText("N_LabelMemoryText", sSystemRAM.." (~"..tSystemRAMFake.MemoryLoad.."% used)");
    	-- Get a list of all detected drives
    	ListBox.DeleteItem("N_ListBoxDrives", LB_ALLITEMS);
    	tDrives = Drive.Enumerate();
    	nDriveCount = Table.Count(tDrives);
    	nDriveCountStart = 1;
    	for index in tDrives do
    		nDriveType = Drive.GetType(tDrives[index]);
    		if nDriveType == 2 then
    			sDriveType = "Removable Disk";
    			ListBox.AddItem("N_ListBoxDrives", tDrives[index].."   ("..sDriveType..")", "");
    		elseif nDriveType == 3 then
    			sDriveType = "Fixed Disk";
    			tDriveInformation = Drive.GetInformation(tDrives[index]);
    			if tDriveInformation ~= nil then
    				sDriveFileSystem = tDriveInformation.FileSystem;
    				sDriveDisplayName = tDriveInformation.DisplayName;
    				nDriveUsedSpaceMB = Drive.GetUsedSpace(tDrives[index]);
    				nDriveUsedSpaceB = (nDriveUsedSpaceMB * 1024) * 1024;
    				nDriveTotalSpaceMB = Drive.GetSize(tDrives[index]);
    				nDriveTotalSpaceB = (nDriveTotalSpaceMB * 1024) * 1024;
    				sDriveTotalSpace = String.GetFormattedSize(nDriveTotalSpaceB, FMTSIZE_AUTOMATIC, true);
    				nDriveFreePercent = (nDriveUsedSpaceB / nDriveTotalSpaceB) * 100;
    				ListBox.AddItem("N_ListBoxDrives", tDrives[index].."   ("..sDriveDisplayName..", "..sDriveType..", "..sDriveFileSystem..", "..sDriveTotalSpace..", "..Math.Round(nDriveFreePercent, 0).."% used)", "");
    			end
    		elseif nDriveType == 4 then
    			sDriveType = "Network Drive";
    			tDriveInformation = Drive.GetInformation(tDrives[index]);
    			if tDriveInformation ~= nil then
    				sDriveFileSystem = tDriveInformation.FileSystem;
    				sDriveDisplayName = tDriveInformation.DisplayName;
    				nDriveUsedSpaceMB = Drive.GetUsedSpace(tDrives[index]);
    				nDriveUsedSpaceB = (nDriveUsedSpaceMB * 1024) * 1024;
    				nDriveTotalSpaceMB = Drive.GetSize(tDrives[index]);
    				nDriveTotalSpaceB = (nDriveTotalSpaceMB * 1024) * 1024;
    				sDriveTotalSpace = String.GetFormattedSize(nDriveTotalSpaceB, FMTSIZE_AUTOMATIC, true);
    				nDriveFreePercent = (nDriveUsedSpaceB / nDriveTotalSpaceB) * 100;
    				ListBox.AddItem("N_ListBoxDrives", tDrives[index].."   ("..sDriveDisplayName..", "..sDriveType..", "..sDriveFileSystem..", "..sDriveTotalSpace..", "..Math.Round(nDriveFreePercent, 0).."% used)", "");
    			else
    				ListBox.AddItem("N_ListBoxDrives", tDrives[index].."   (Unknown or disconnected)", "");
    			end
    		elseif nDriveType == 5 then
    			sDriveType = "CD/DVD Drive";
    			ListBox.AddItem("N_ListBoxDrives", tDrives[index].."   ("..sDriveType..")", "");
    		else
    			sDriveType = "Unknown"
    			ListBox.AddItem("N_ListBoxDrives", tDrives[index].."   ("..sDriveType..")", "");
    		end
    	end
    	-- Get a list of all installed playback WDM audio devices
    	ListBox.DeleteItem("N_ListBoxAudioDevices", LB_ALLITEMS);
    	sAudioOutDevices = DLL.CallFunction("AutoPlay\\Docs\\WaveInOutDev.dll", "GetWaveOutDevs", "", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL)
    	nCountOut = 1;
    	if sAudioOutDevices ~= "" then
    		nSemiColons = String.Find(sAudioOutDevices, ";;", 1, false);
    		if nSemiColons == -1 then
    			ListBox.AddItem("N_ListBoxAudioDevices", "Playback "..nCountOut..":  "..sAudioOutDevices.." (Default Device)", "");
    		else
    			nDefaultOut = 1;
    			nStop = 0;
    			while nStop ~= 1 do
    				if nDefaultOut == 1 then
    					ListBox.AddItem("N_ListBoxAudioDevices", "Playback "..nCountOut..":  "..String.Left(sAudioOutDevices, nSemiColons-1).." (Default Device)", "");
    					nDefaultOut = 0;
    					nCountOut = nCountOut + 1;
    				else
    					ListBox.AddItem("N_ListBoxAudioDevices", "Playback "..nCountOut..":  "..String.Left(sAudioOutDevices, nSemiColons-1), "");
    					nCountOut = nCountOut + 1;
    				end
    				sAudioOutDevicesTrimmed1 = String.TrimLeft(sAudioOutDevices, String.Left(sAudioOutDevices, nSemiColons-1));
    				sAudioOutDevicesTrimmed2 = String.TrimLeft(sAudioOutDevicesTrimmed1, ";");
    				sAudioOutDevices = sAudioOutDevicesTrimmed2;
    				nSemiColons = String.Find(sAudioOutDevices, ";;", 1, false);
    				if nSemiColons == -1 then
    					ListBox.AddItem("N_ListBoxAudioDevices", "Playback "..nCountOut..":  "..sAudioOutDevices, "");
    					nStop = 1;
    					nCountOut = nCountOut + 1;
    				end
    			end
    		end
    	else
    		ListBox.AddItem("N_ListBoxAudioDevices", "No playback devices detected", "");
    	end
    	-- Get a list of all installed recording WDM audio devices
    	sAudioInDevices = DLL.CallFunction("AutoPlay\\Docs\\WaveInOutDev.dll", "GetWaveInDevs", "", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL)
    	nCountIn = 1;
    	if sAudioInDevices ~= "" then
    		nSemiColons = String.Find(sAudioInDevices, ";;", 1, false);
    		if nSemiColons == -1 then
    			ListBox.AddItem("N_ListBoxAudioDevices", "Record "..nCountIn..":  "..sAudioInDevices.." (Default Device)", "");
    		else
    			nDefaultIn = 1;
    			nStop = 0;
    			while nStop ~= 1 do
    				if nDefaultIn == 1 then
    					ListBox.AddItem("N_ListBoxAudioDevices", "Record "..nCountIn..":  "..String.Left(sAudioInDevices, nSemiColons-1).." (Default Device)", "");
    					nDefaultIn = 0;
    					nCountIn = nCountIn + 1;
    				else	
    					ListBox.AddItem("N_ListBoxAudioDevices", "Record "..nCountIn..":  "..String.Left(sAudioInDevices, nSemiColons-1), "");
    					nCountIn = nCountIn + 1;
    				end
    				sAudioInDevicesTrimmed1 = String.TrimLeft(sAudioInDevices, String.Left(sAudioInDevices, nSemiColons-1));
    				sAudioInDevicesTrimmed2 = String.TrimLeft(sAudioInDevicesTrimmed1, ";");
    				sAudioInDevices = sAudioInDevicesTrimmed2;
    				nSemiColons = String.Find(sAudioInDevices, ";;", 1, false);
    				if nSemiColons == -1 then
    					ListBox.AddItem("N_ListBoxAudioDevices", "Record "..nCountIn..":  "..sAudioInDevices, "");
    					nStop = 1;
    					nCountIn = nCountIn + 1;
    				end
    			end
    		end
    	else
    		ListBox.AddItem("N_ListBoxAudioDevices", "No record devices detected", "");
    	end
    	-- Get the operating system information
    	sOSName = System.GetOSName();
    	tOSVersionInfo = System.GetOSVersionInfo();
    	sOSServicePack = tOSVersionInfo.CSDVersion;
    	if (sOSName == "Windows 95") then
    		Label.SetText("N_LabelOSText", "Microsoft "..sOSName);
    	elseif (sOSName == "Windows 98") then
    		Label.SetText("N_LabelOSText", "Microsoft "..sOSName);
    	elseif (sOSName == "Windows NT 3") then
    		Label.SetText("N_LabelOSText", "Microsoft "..sOSName);
    	elseif (sOSName == "Windows NT 4") then
    		Label.SetText("N_LabelOSText", "Microsoft "..sOSName);
    	elseif (sOSName == "Windows ME") then
    		Label.SetText("N_LabelOSText", "Microsoft "..sOSName);
    	elseif (sOSName == "Windows Server 2003") then
    		if tOSVersionInfo.Enterprise then
    			Label.SetText("N_LabelOSText", "Microsoft "..sOSName.." Enterprise ("..sOSServicePack..")");
    		elseif tOSVersionInfo.SmallBusiness then
    			Label.SetText("N_LabelOSText", "Microsoft "..sOSName.." Small Business ("..sOSServicePack..")");
    		else
    			Label.SetText("N_LabelOSText", "Microsoft "..sOSName.." Standard ("..sOSServicePack..")");
    		end
    	elseif (sOSName == "Windows XP") then
    		Label.SetText("N_LabelOSText", "Microsoft "..sOSName.." Professional ("..sOSServicePack..")");
    	elseif (sOSName == "Windows XP" and tOSVersionInfo.Personal) then
    		Label.SetText("N_LabelOSText", "Microsoft "..sOSName.." Home ("..sOSServicePack..")");
    	elseif (sOSName == "Windows 2000" and tOSVersionInfo.ProductType == 3) then
    		Label.SetText("N_LabelOSText", "Microsoft "..sOSName.." Server ("..sOSServicePack..")");
    	else
    		Label.SetText("N_LabelOSText", "Microsoft "..sOSName.." ("..sOSServicePack..")");
    	end
    	-- Get the network information
    	tLANInfo = System.GetLANInfo();
    	sLANInfoHost = tLANInfo.Host;
    	sLANInfoDomain = tLANInfo.Domain;
    	sLANInfoUser = tLANInfo.User;
    	sLANInfoIP = tLANInfo.IP;
    	tUserInfo = System.GetUserInfo();
    	Label.SetText("N_LabelComputerNameText", tLANInfo.Host);
    	if tUserInfo.IsAdmin then
    		Label.SetText("N_LabelCurrentUserText", tLANInfo.User.." (Local Administrator)");
    	else
    		Label.SetText("N_LabelCurrentUserText", tLANInfo.User);
    	end
    	Label.SetText("N_LabelIPAddressText", tLANInfo.IP);
    	sWorkgroupName = DLL.CallFunction("AutoPlay\\Docs\\WGDomain.dll", "GetWGDomain", "", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL)
    	Label.SetText("N_LabelWorkgroupText", sWorkgroupName);
    	-- Get the display information
    	tDisplayInfo = System.GetDisplayInfo();
    	sDisplayWidth = tDisplayInfo.Width
    	sDisplayHeight = tDisplayInfo.Height
    	sDisplayColorDepth = tDisplayInfo.ColorDepth
    	Label.SetText("N_LabelDisplayInfoText", sDisplayWidth.." x "..sDisplayHeight.." @ "..sDisplayColorDepth.."bit");
    end
    Attached Images

  7. #7
    Join Date
    May 2006
    Posts
    5,380
    Hey Tek, thats a nice chunk of code, i'll have a syphen through it as im sure theres loads in there i could use

    Thanks
    Open your eyes to Narcissism, Don't let her destroy your life!!

  8. #8
    Join Date
    Nov 2006
    Posts
    8
    Hey Tek, can you post your code in *.apz file?

  9. #9
    Join Date
    May 2006
    Posts
    5,380
    Hey tek, theres a dll mentioned in there "WaveInOutDev.dll", any chance you could upload that for me, (thats if you are ok with that)

    it sure looks like something i could use

    Thanks, even if you dont want to


    Here tripc, i added all the lables n stuff and added worms "WGDomain.dll" coz it is mentioned in there to and i had it on hdd

    hope you dont mind tek, tought it would save you the trouble
    Last edited by RizlaUK; 02-01-2009 at 11:35 AM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  10. #10
    Join Date
    Mar 2004
    Location
    Toronto, ON CANADA
    Posts
    696
    You can get the WaveInOut DLL here:

    http://www.indigorose.com/forums/sho...7494#post77494

    Credit goes to Worm for creating it.

  11. #11
    Join Date
    May 2006
    Posts
    5,380
    ah-ha, another of worms offerings, thanks for pointion me in the right direction tek, although i did search the forum and googled it and found notheing


    thanks
    Open your eyes to Narcissism, Don't let her destroy your life!!

Similar Threads

  1. html page and link
    By mountain07 in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 11-19-2005, 09:00 PM
  2. Is there a way to go to next page easier?
    By christywalter in forum AutoPlay Media Studio 5.0
    Replies: 5
    Last Post: 11-11-2004, 02:37 PM
  3. Quick Script: Get key System Information
    By SUF6NEWBIE in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 08-31-2004, 12:28 AM
  4. Setting Page Transition Effects
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-24-2003, 01:08 PM
  5. HOWTO: Create a Page Template
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-26-2002, 05:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts