Ir para conteúdo
Fórum Script Brasil

melquirj

Membros
  • Total de itens

    14
  • Registro em

  • Última visita

Sobre melquirj

melquirj's Achievements

0

Reputação

  1. Eu sei, ainda interessa a resposta ??????
  2. Me desculpe pelo "flood" é que eu vi que não tinha saido o meu nick dai postei novamente.
  3. Descobri uma forma de ler o registro do windows via " html ", segue abaixo as linhas de comandos, agora tenho que apenas exibir o dado que eu quiser. Dá uma olhada nesse script. <HEAD> <TITLE>ActiveX Regedit sample - Registry viewer</TITLE> <HTA:APPLICATION ID="RegEdit" APPLICATIONNAME="RegEdit" CAPTION="yes" ICON="regedit.ico" SHOWINTASKBAR="yes" SINGLEINSTANCE="no" SYSMENU="yes" SCROLLBAR="no" > <STYLE TYPE="text/css"><!--BODY {font-size:10pt;font-family:Arial,Arial CE,Helvetica,sans-serif }TH {font-size:10pt;font-family:Arial,Arial CE,Helvetica,sans-serif }TABLE {font-size:10pt;font-family:Arial,Arial CE,Helvetica,sans-serif }--></STYLE> </head> <STYLE TYPE="text/css"><!--BODY {font-size:10pt;font-family:Arial,Arial CE,Helvetica,sans-serif }TH {font-size:10pt;font-family:Arial,Arial CE,Helvetica,sans-serif }TABLE {font-size:10pt;font-family:Arial,Arial CE,Helvetica,sans-serif }--></STYLE> </head> <Body TOPMARGIN=0 BGPROPERTIES=FIXED BGCOLOR=WHITE LINK=RED VLINK=BLUE ALINK=GREEN> This file is sample of using <A Href=http://www.pstruh.cz/help/regedit/library.htm>ActiveX Regedit</A>. <HR Size=1 COLOR=Silver> Connect to : <Input ID=RemoteServer><Input Type=Button Value="Connect" OnClick="do_Connect();"> <br> <br> <Table Border=0 CellPadding=0 CellSpacing=0> <TR> <TH VAlign=Top NoWrap>Registry keys<Div ID=ServerName>(Local)</Div></TH> <TH Width=200><Font Size=1>Registry values<Div ID=KeyName>None</Div></Font></TH> </TR> <TR><TD VAlign=Top> <Table Border=0 CellPadding=0 CellSpacing=0><TR><TD><DIV ID=Tree></Div></TD></TR></TABLE> </TD><TD VAlign=Top> <Table Border=0 CellPadding=0 CellSpacing=0><TR><TD><DIV ID=Vals></Div></TD></TR></TABLE> </TD></TR> </TABLE> <HR Size=1 COLOR=Silver> <FONT SIZE=-2>© 1998 – 1999 <a href=http://www.pstruh.cz>PSTRUH Software</a>, <a href=mailto:help@pstruh.cz>help@pstruh.cz</a></FONT> </Body> </html> <script Language=VBSCRIPT ID=Main> option explicit Init Sub Init() 'Writes root keys to the key tree. Dim HTML HTML = HTMLKeyCode("",Array("HKEY_CURRENT_USER", "HKEY_LOCAL_MACHINE", "HKEY_USERS","HKEY_CLASSES_ROOT")) Tree.innerHTML = HTML Vals.innerHTML = "" KeyName.innerHTML = "" End Sub function do_Connect 'Connects to the remote computer registry. dim Server set Server = GetServer() if Server Is Nothing then Exit Function on error resume next Server.Connect RemoteServer.value 'msgbox Err if Err<>0 then 'on error goto 0 msgbox "Error connect registry, server '" & RemoteServer.value & "', " & Err.Description exit function ServerName.innerHTML = "(Local)" end if if RemoteServer.value="" then ServerName.innerHTML = "(Local)" else ServerName.innerHTML = "(" & RemoteServer.value & ")" end if Init end function 'Vals.document.write HTMLValueCode("HKCU\CONSOLE", GetServer().GetKey("HKLM\SOFTWARE").Values) Function HTMLKeyCode(byval Parent, Keys) 'Writes one key as one-level HTML tree (one table) Dim HTML, pHTML, Key, KeyText, numSubKeys, numValues, n, KeyName HTML = "<Table Border=0 CellPadding=0 CellSpacing=0>" & vbCrLf if Parent<>"" then Parent = Parent & "\" numSubKeys = 1 numValues = 1 n = 0 For Each Key In Keys n = n + 1 'Get mumber of subkeys and values of the subkey. numValues=0 numSubKeys=1 if isobject(Key) then on error resume next numValues = Key.numValues numSubKeys = Key.numSubKeys if Err then nOfSubKeys=0 numValues=0 end if on error goto 0 end if KeyText = Parent & Key KeyName = KeyText window.status = KeyText pHTML = "<TR><TD VAlign=TOP>" 'Reference to subkeys if numSubKeys>0 then pHTML = pHTML & "<DIV ID=""X" & KeyName & """>" pHTML = pHTML & "<A href=""#"" onclick=""return ExTree('" & replace(KeyText,"\","\\") & "');"">+</A>" pHTML = pHTML & "</Div>" end if pHTML = pHTML & "</TD><TD> " 'Reference to values if numValues>0 then pHTML = pHTML & "<A href=""#"" onclick=""return ExVal('" & replace(KeyText,"\","\\") & "');"">" pHTML = pHTML & Key if numValues>0 then pHTML = pHTML & "</A>" if numSubKeys>0 or numValues>0 then pHTML = pHTML & "<Font Size=1> " & numSubKeys & "," & numValues & "</Font>" 'subkeys div to show subkeys. pHTML = pHTML & "<DIV ID=""" & KeyName & """></Div>" HTML = HTML & pHTML & "</TD></TR>" & vbCrLf if n>100 then HTML = HTML & pHTML & "<TR><TD></TD><TD>Truncated to 100 records</TD></TR>" & vbCrLf exit for end if Next HTML = HTML & "</Table>" & vbCrLf HTMLKeyCode = HTML End Function Function HTMLValueCode(byval Parent, Keys) 'Writes values of one key as a table Dim HTML, Key, KeyText, ValText HTML = "<Table Border=1 CellPadding=0 CellSpacing=0>" & vbCrLf If Parent <> "" Then Parent = Parent & "\" HTML = HTML & "<TR><TH VAlign=TOP> Name </TH><TH> Value </TH></TH>" & vbCrLf For Each Key In Keys HTML = HTML & "<TR><TD VAlign=TOP> " if Key.Name="" then HTML = HTML & "<i>DefaultValue</i>" else HTML = HTML & Key.Name HTML = HTML & " <Font Size=1><I>(" select case Key.Type case 1 : HTML = HTML & "String" case 2 : HTML = HTML & "ExpandString" case 3 : HTML = HTML & "Binary" case 4 : HTML = HTML & "DWord" case 7 : HTML = HTML & "MultiString" end select HTML = HTML & ")</I></Font>" HTML = HTML & " </TD><TD> " 'name Link on error resume next ValText = "" & Key.Value if err<>0 then ValText = "?" ValText = replace(ValText, chr(0), "%00") HTML = HTML & ValText if Key.Type=4 then HTML = HTML & "(0x" & Hex(Key.Value) & ")" on error goto 0 HTML = HTML & "</TD></TR>" & vbCrLf Next HTML = HTML & "</Table>" & vbCrLf HTMLValueCode = HTML End Function function ExTree(KeyText) 'Expands one level of tree ExTree = False dim S, Key, HTML set S = GetServer if S Is Nothing then Exit Function on error resume next set Key = S.GetKey(KeyText) if err<>0 then msgbox "Error open key : " & KeyText & ", " & Err.Description exit function end if on error goto 0 HTML = HTMLKeyCode(KeyText, Key.SubKeys) Tree.all(KeyText).innerHTML = HTML Tree.all(KeyText).style.display = "" Tree.all("X" & KeyText ).innerHTML = "<A href=""#"" onclick=""return HideTree('" & replace(KeyText,"\","\\") & "');"">-</A>" end function function HideTree(KeyText) 'Hides one level of tree Tree.all(KeyText).innerHTML = "" Tree.all(KeyText).style.display = "none" Tree.all("X" & KeyText ).innerHTML = "<A href=""#"" onclick=""return ExTree('" & replace(KeyText,"\","\\") & "');"">+</A>" HideTree = False end function function ExVal(Co) 'Writes values from one key ExVal = False dim S, Key, HTML set S = GetServer if S Is Nothing then Exit Function on error resume next set Key = S.GetKey(Co) if err<>0 then msgbox "Error open key : " & KeyText & ", " & Err.Description exit function end if on error goto 0 HTML = HTMLValueCode(Co, Key.Values) Vals.innerHTML = HTML KeyName.innerHTML = Co end function dim xServer Function GetServer() On Error Resume Next Set GetServer = Nothing If Not IsObject(xServer) Then Set xServer = CreateObject("RegEdit.Server") If Err = 429 Then dim Res Res = MsgBox("ActiveX RegEdit library is not installed. Do you want to download it from http://www.pstruh.cz now ?", 4, "ActiveX RegEdit") If Res = 6 Then dim newWindow Set newWindow = window.open("http://www.pstruh.cz/dlldownload/regedit.exe") End If ElseIf Err<>0 then MSGBox "Error create ActiveX Regedit object." else Set GetServer = xServer End If Else Set GetServer = xServer End If On Error GoTo 0 End Function </Script> Tá meio zoneado, mas acho que dá para entender, qualquer duvida reporta. Preciso muito da ajuda de vocês para tentar construir este projeto.
  4. dark0, se você reportasse a maneira que você citou eu ficaria muito grato, pois seria uma tentativa aqui.
  5. Bom Dia !!! Agradeço a todos pela ajuda e me perdoem por não expressar a minha dificuladade corretamente, o que eu quero o dark0 reportou aqui. A minha dificuldade maior é no win98 pois no xp eu posso criar um job que crie este html via variaveis de sistema, tipo %UserName% e %ComputerName%, mas o que eu queria é uma coisa mais dinamica, ou seja, que aparecesse automaticamente, pois da maneira que citei acima o processo ainda fica meio que manual. Se alguém puder me enviar outras sujestões ficarei muito grato.
  6. O Aida eu conheço, mas o que eu queria saber é como que ele faz para obter estes dados e depois gerar este relatório, pois o que eu quero é colocar estas linhas de comandos e obter os dados no desktop do windows.
  7. o que eu quero fazer é o seguinte: Estão querendo padronizar todas os pc's daqui da empresa, hj em dia eu uso o poledit para fazer isso, mas me pediram que eu fizesse um papel de parede padronizado que contesse o nome do usuario que esta logado e tambem o nome do pc, dai eu tive uma ideia, a unica maneira de fazer isso, claro que com menos trabalho, ´´e usando html, ou seja, o Active Desctop, dai eu preciso obter os dados do registro do windows.
  8. Na verdade eu quer exibir dados do registro em uma página html
  9. Na verdade eu quero pegar dados do registro do windows para colocar em uma pagina html, a ferramenta para fazer isso eu não conheço.
  10. Ola !!!! Estou precisando exibir dados do registro do windows em uma página html, dados como, nome do computador, usuario logado e varios outros... Caso não possa ser feito em html gostaria de sujestões para executar este procedimento. Gratop pela atenção
  11. Ola pessoal !!!! Sou novo no forum e já estou precisando de uma grande ajuda. O probema é o seguinte: como que eu posso exibir dados do registro do windows em uma página de web, ou seja, quando a pessoa abrir a página ela possa ver em algum lugar, o login e o nome do computador que esta abrindo a página. Sem mais. Grato pela atenção.
  12. Em qual tipo de arquivo web posso fazer ?????
  13. Ola pessoal !!!! Sou novo no forum e já estou precisando de uma grande ajuda. O probema é o seguinte: como que eu posso exibir dados do registro do windows em uma página de web, ou seja, quando a pessoa abrir a página ela possa ver em algum lugar, o login e o nome do computador que esta abrindo a página. Sem mais. Grato pela atenção.
×
×
  • Criar Novo...