Create Desktop shortcut in User Profile if missing
0 Votes |
Description
Property Details
720 | |
Create Desktop shortcut in User Profile if missing | |
BESC | |
Internal | |
11/8/2011 12:00:00 AM | |
Create Desktop User Profile shortcut | |
jgstew on 12/5/2012 10:52:20 AM | |
jgstew on 12/5/2012 10:52:20 AM | |
12818 Views / 56 Downloads | |
![]() ![]() ![]() ![]() ![]() |
Relevance

(name of it = "WinXP" OR name of it = "WinXP-2003" OR (name of it = "WinVista" AND product type of it = nt workstation product type AND NOT x64 of it) OR (name of it = "WinVista" AND product type of it = nt workstation product type AND x64 of it) OR (name of it = "Win7" AND NOT x64 of it) OR (name of it = "Win7" AND x64 of it)) of operating system
Used in 8 fixlets | * Results in a true/false |

exists current user AND (1 = number of logged on users)
Used in 1 fixlet | * Results in a true/false |

exists folder ((value "USERPROFILE" of key ("HKEY_USERS\" & (name of key whose (((it = name of current user as lowercase OR it starts with name of current user as lowercase & "@") of (it as string as lowercase) of (if (name of operating system = "Win7") then value "USERNAME" of key "Volatile Environment" of it else value "Logon User Name" of key "Software\Microsoft\Windows\CurrentVersion\Explorer" of it))) of key "HKEY_USERS" of registry) & "\Volatile Environment") of registry as string) & "\Links")
Used in 1 fixlet | * Results in a true/false |

not exists file "Desktop.lnk" of folder ((value "USERPROFILE" of key ("HKEY_USERS\" & (name of key whose (((it = name of current user as lowercase OR it starts with name of current user as lowercase & "@") of (it as string as lowercase) of (if (name of operating system = "Win7") then value "USERNAME" of key "Volatile Environment" of it else value "Logon User Name" of key "Software\Microsoft\Windows\CurrentVersion\Explorer" of it))) of key "HKEY_USERS" of registry) & "\Volatile Environment") of registry as string) & "\Links")
Actions
Action 1 (default)
Action Link Click
here to deploy this action.
Script Type
BigFix Action Script
delete __appendfileSuccess Criteria
delete makeshortcut.vbs
appendfile Set oWS = WScript.CreateObject("WScript.Shell")
appendfile sLinkFile = "{(pathname of folder (value "USERPROFILE" of key ("HKEY_USERS\" & (name of key whose (((it = name of current user as lowercase OR it starts with name of current user as lowercase & "@") of (it as string as lowercase) of (if (name of operating system = "Win7") then value "USERNAME" of key "Volatile Environment" of it else value "Logon User Name" of key "Software\Microsoft\Windows\CurrentVersion\Explorer" of it))) of key "HKEY_USERS" of registry) & "\Volatile Environment") of registry as string))}\Links\Desktop.lnk"
appendfile Set oLink = oWS.CreateShortcut(sLinkFile)
appendfile oLink.TargetPath = "{(pathname of folder (value "USERPROFILE" of key ("HKEY_USERS\" & (name of key whose (((it = name of current user as lowercase OR it starts with name of current user as lowercase & "@") of (it as string as lowercase) of (if (name of operating system = "Win7") then value "USERNAME" of key "Volatile Environment" of it else value "Logon User Name" of key "Software\Microsoft\Windows\CurrentVersion\Explorer" of it))) of key "HKEY_USERS" of registry) & "\Volatile Environment") of registry as string))}\Desktop"
appendfile ' oLink.Arguments = ""
appendfile ' oLink.Description = "Desktop"
appendfile ' oLink.HotKey = ""
//appendfile ' oLink.IconLocation = "{pathname of system folder}\imageres.dll"
appendfile ' oLink.WindowStyle = "1"
appendfile ' oLink.WorkingDirectory = ""
appendfile oLink.Save
move __appendfile makeshortcut.vbs
waithidden "{pathname of system folder & "\cscript.exe"}" makeshortcut.vbs
This action will be considered successful when the applicability relevance evaluates to false.
Sharing
Social Media: |