VB script help needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • delwar66
    New Member
    • Nov 2006
    • 14

    #16
    Hi willakawill

    Thank you very much. You guys are ausome. I will check it over the weekend as I will be very busy Friday. I will let u know if there is any problem. But it looks to me would work perfectly.
    Again thanks a lot.
    I must say this is a wonderful forum.
    Keep it up guys!

    Comment

    • willakawill
      Top Contributor
      • Oct 2006
      • 1646

      #17
      Originally posted by Killer42
      Hi Willakawill. :)

      The validation is good, and people so often overlook it. But, though I haven't checked, I have a feeling that negative numbers might slip past you here.
      You are absolutely right K. Well spotted. It should read:
      intStart = Abs(CInt(stInpu t))

      and

      intEnd = Abs(CInt(stInpu t))

      Comment

      • delwar66
        New Member
        • Nov 2006
        • 14

        #18
        Hi Guys,
        I hope you can help me little more. I have a script that run and collect remote computer monitor information but only if I am logged on the local machine as administrator and if the admin password of the remote and local machine is same. I have work around with this and got stuck at the point where I need to authenticate with the remote machine for the following entry

        Code:
        Set oRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "/root/default:StdRegProv")
        Is there any idea how can i authenticate this part with alternate credentials

        I have come to this point....
        Code:
        Const WbemAuthenticationLevelPktPrivacy = 6
        StrLine = Trim(inputbox("Enter name or IP address of local or remote computer"))
        strNamespace = "root\cimv2" 
        strUser = "administrator"
        strPassword = "***********"
        
        Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")
        Set objWMIService = objwbemLocator.ConnectServer _
        (strLine, strNamespace,  strUser, strPassword)
        objWMIService.Security_.authenticationLevel = WbemAuthenticationLevelPktPrivacy
        Now can u guys help me to get the first code implement into the 2nd code.

        Thanks a lot.

        Comment

        • willakawill
          Top Contributor
          • Oct 2006
          • 1646

          #19
          Originally posted by delwar66
          Hi Guys,
          I hope you can help me little more. I have a script that run and collect remote computer monitor information but only if I am logged on the local machine as administrator and if the admin password of the remote and local machine is same. I have work around with this and got stuck at the point where I need to authenticate with the remote machine for the following entry

          Code:
          Set oRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "/root/default:StdRegProv")
          Is there any idea how can i authenticate this part with alternate credentials

          I have come to this point....
          Code:
          Const WbemAuthenticationLevelPktPrivacy = 6
          StrLine = Trim(inputbox("Enter name or IP address of local or remote computer"))
          strNamespace = "root\cimv2" 
          strUser = "administrator"
          strPassword = "***********"
          
          Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")
          Set objWMIService = objwbemLocator.ConnectServer _
          (strLine, strNamespace,  strUser, strPassword)
          objWMIService.Security_.authenticationLevel = WbemAuthenticationLevelPktPrivacy
          Now can u guys help me to get the first code implement into the 2nd code.

          Thanks a lot.
          Hi. Sorry. Not for me this one. I never support potential breaches of security.

          Comment

          • Killer42
            Recognized Expert Expert
            • Oct 2006
            • 8429

            #20
            Originally posted by willakawill
            Hi. Sorry. Not for me this one. I never support potential breaches of security.
            Well don't look at me - I don't even understand it. Never had much to do with networking, unfortunately.

            I'd suggest starting a new thread with a subject line that gives a clear indication of the problem, to attract someone who can help.

            Comment

            Working...