Skip to content

Instantly share code, notes, and snippets.

@mendelgusmao

mendelgusmao/Usage

Created Dec 5, 2012
Embed
What would you like to do?
Automatic key loader for Pageant
Set shell = CreateObject("WScript.Shell")
start_folder = shell.ExpandEnvironmentStrings("%USERPROFILE%") + "\.ssh\"
Set files = CreateObject("Scripting.FileSystemObject").GetFolder(start_folder).Files
keys = ""
For Each file in files
If (Right(file.Name, 3) = "ppk") Then
keys = keys & """" & CStr(file.Path) & """ "
End If
Next
shell.Run "pageant.exe " + keys, 1, false
wscript C:\path\to\pageant.loader.vbs
Tip: use mlin's StartupCPL http://www.mlin.net/StartupCPL.shtml
or add a shortcut to the vbs in the startup folder under start menu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment