Jump to content

Search the Community

Showing results for tags 'Need help creating a function'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hello, I need my program to be able to add credentials in Credential manager in Windows 7. I have used the "net use x: \\servername\sharename /savecred' Command, but it doesn't seem very clean and I am not always guaranteed that it works as sometimes CMD hangs. I see there is an API to add credentials on the MSDN site called CredWrite. I have made my best attempt to get this to work, but I am not having much luck. I am hoping someone can look at my code and help point me in the right direction. Here is the code I have for a UDF function: Func _WinAPI_CredWrite($credential[11],$credential[6],$credential[2]) $credential[0] = 4 ;Flags $credential[1] = 2 ;Type $credential[2] = "" ;TargetName - Servername $credential[3] = "" ;Comment $credential[4] = @HOUR & ":" & @MIN ;LastWritten $credential[5] = 512 ;CredentialBlobSize $credential[6] = "" ;CredentialBlob - Password? $credential[7] = 2 ;Persist $credential[8] = 64 ;AttributeCount $credential[9] = "" ; Attributes $credential[10] = "" ;TargetAlias $credential[11] = "" ;Username Local $Ret = DllCall('advapi32.dll', 'int', 'CredWriteW', 'ptr', $credential, 'dword', 0) EndFunc ;==>_WinAPI_CredWrite The URL for the API function is: http://msdn.microsoft.com/en-us/library/aa375187(v=VS.85).aspx Thanks for any help! Jeff
×
×
  • Create New...