Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Const NETHOOD = &H13& ' Create under NetHood locations
- Set objWSHShell = CreateObject("Wscript.Shell")
- Set objShell = CreateObject("Shell.Application")
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- Set objFolder = objShell.Namespace(NETHOOD)
- Set objFolderItem = objFolder.Self
- strNetHood = objFolderItem.Path
- strShortcutName = "SafeWindow Documents"
- strShortcutPath = "\\webdav.bankvaultonline.com@SSL\Documents\"
- strShareFolder = objFSO.BuildPath(strNetHood, strShortcutName)
- strShortcut = objFSO.BuildPath(strShareFolder, "target.lnk")
- If objFSO.FolderExists(strShareFolder)=False Then
- objFSO.CreateFolder(strShareFolder)
- strDesktopIni = objFSO.BuildPath(strShareFolder, "Desktop.ini")
- Set fh = objFSO.OpenTextFile(strDesktopIni, 2, True)
- fh.WriteLine "[.ShellClassInfo]"
- fh.WriteLine "CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}"
- fh.WriteLine "Flags=2"
- fh.Close
- strCWD = objFSO.getAbsolutePathName(".")
- Set objShortcut = objWSHShell.CreateShortcut(strShortcut)
- objShortcut.TargetPath = strShortcutPath
- objShortcut.WindowStyle = 1
- objShortcut.IconLocation = objFSO.BuildPath(strCWD, "safewindow48.ico")
- objShortcut.Save
- Set fileShortcut = objFSO.GetFile(strShortcut)
- fileShortcut.attributes = 36 ' S(4) + A(32)
- Set folderShare = objFSO.GetFolder(strShareFolder)
- folderShare.attributes = 1 ' R(1)
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement