This VBScript must be run as a logon script of windows GPO that will create the CyberArk PrivateArk Workspace Link in Windows Explorer Favorites
Requirements:
- CyberArk PrivateArk
- Microsoft Windows 7 or higher
PrivateArkWorkspaceLink_v1.0.vbs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
' ############################################################################## ' # Lupi Gabriel # ' # www.lupigabriel.it # ' # info@lupigabriel.it # ' ############################################################################## ' # Copyright (c) 2014 Lupi Gabriel All rights reserved. # ' ############################################################################## ' # VERSION : 1.0 # ' # FILE : PrivateArkWorkspaceLink_v1.0.vbs # ' # CLASS : Script # ' # LANGUAGE : VB Script # ' # OUPUT : "%UserProfile%\Links" # ' ############################################################################## On Error Resume Next Set oShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists(oShell.ExpandEnvironmentStrings("%PROGRAMFILES%") & "\PrivateArk\Client\Arkui.exe") = True Or objFSO.FileExists(oShell.ExpandEnvironmentStrings("%PROGRAMFILES(X86)%") & "\PrivateArk\Client\Arkui.exe") = True Then If objFSO.FileExists(oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Links\Workspace.lnk") = False Then If objFSO.FolderExists(oShell.ExpandEnvironmentStrings("%APPDATA%") & "\CyberArk\PrivateArk\Workspace") = True Then Set oShortCut = oShell.CreateShortcut(oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Links\Workspace.lnk") oShortCut.TargetPath = oShell.ExpandEnvironmentStrings("%APPDATA%") & "\CyberArk\PrivateArk\Workspace" oShortCut.Save End If End If Else If objFSO.FileExists(oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Links\Workspace.lnk") = True Then objFSO.DeleteFile oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Links\Workspace.lnk" End If End If |