'바로가기'에 해당되는 글 1건

  1. 2010.11.04 바탕화면과 프로그램 그룹에 단축 아이콘을 만드는 VBScript
이제보니 프롬프트에서 VBS 파일 이름만 입력해도 그냥 실행이 되는구나...
wscript나 cscript는 옵션 줄 때만 필요한 거군.

set WshShell = WScript.CreateObject("WScript.Shell")
set fso = CreateObject("Scripting.FileSystemObject")
 
strDesktop = WshShell.SpecialFolders("Desktop")
strPrograms = WshShell.SpecialFolders("Programs")
strProgramGroup = strPrograms & "\Group"
strCurrFolder = fso.GetParentFolderName(WScript.ScriptFullName)
 
set oShellLinkDesktop = WshShell.CreateShortcut(strDesktop & "\MyApplication.lnk")
oShellLinkDesktop.TargetPath = strCurrFolder & "\MyApplication.exe"
oShellLinkDesktop.WindowStyle = 1
oShellLinkDesktop.Hotkey = ""
oShellLinkDesktop.IconLocation = strCurrFolder & "\MyApplication.exe, 0"
oShellLinkDesktop.Description = "MyApplication"
oShellLinkDesktop.WorkingDirectory = strCurrFolder
oShellLinkDesktop.Save
 
If (fso.FolderExists(strProgramGroup)=False) Then
    fso.CreateFolder(strProgramGroup)
End If
 
set oShellLinkPrograms = WshShell.CreateShortcut(strProgramGroup & "\MyApplication.lnk")
oShellLinkPrograms.TargetPath = strCurrFolder & "\MyApplication.exe"
oShellLinkPrograms.WindowStyle = 1
oShellLinkPrograms.Hotkey = ""
oShellLinkPrograms.IconLocation = strCurrFolder & "\MyApplication.exe, 0"
oShellLinkPrograms.Description = "MyApplication"
oShellLinkPrograms.WorkingDirectory = strCurrFolder
oShellLinkPrograms.Save 
Posted by 배트
,