Results 1 to 1 of 1
  1. #1
    Join Date
    Apr 2005

    Unhappy Unanswered: how to put result of shell function into variable?

    Hi all .I have difficulty outputing the value of shell function into massagebox by using regoutput variable. Currently the shell function writes the output to .reg file but i want i want to output it to massage box but it never works!! The output value is list of registery information which are half a page char mostly .

    i tried diffrent datatyes and i got diffrent 4 digit integer each time!!
    Below is the code and it writes the correct registery values into .reg file but i want to display it in massagebox and non of the data types works!!

    Is there any way to display the registeiory information directly into massage box instead of writing it to reg file.?
    since i evantually want to get rid of wirting to file process .
    I be happy if some expert help me.Thanks

    Private Sub Reg(Path As String)
    Dim regoutput
    task_id  = shell("Regedit.exe /e " & Chr(34) & Path & Chr(34) & " " & Chr(34) & _
    "HKEY_CURRENT_USER" & "\" & "Software\me\" & Chr(34))
    'The Char For " is Chr(34)
    MsgBox "shell function output: "+regoutput
    End Sub
    Private Sub Save_Click()
    On Error Resume Next
    CD.DialogTitle = "Save Registry Backup File As..."
    CD.InitDir = App.Path
    CD.Flags = &H4
    CD.Filter = "Registry File Format (*.reg)|*.reg"
    If InStr(CD.FileName, ".reg") Then
    Call Reg(CD.FileName)
    Text1.Text = CD.FileName
    End If
    End Sub
    Last edited by mehran; 04-10-06 at 01:19.

Posting Permissions

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