I have a script that I have been using for a while now that creates a shortcut in a folder in My Documents and sets a user input description to the created shortcut that can be shown in windows explorer by showing “Comments”.
The script does multiple other things and may be ran multiple times for a given job so it is getting rather tedious to retype a description every time the script is ran. I would like for the script to check if the shortcut exists and if so automatically populate the user input box for the description (jobDescription) with the existing description.
Here is the working part of the script:
JobDescription=Inputbox(“Optional: Enter a short description of the job”,”Job Description”, CurrentJob )
If jobDescription = “” then
jobDescription = CurrentJob
set WshShell = WScript.CreateObject(“WScript.Shell”)
strDocuments = “C:Documents and Settings” & name & “My DocumentsReleased Jobs”
strLink = strDocuments & “” & job & “.lnk”
set oShellLink = WshShell.CreateShortcut(strLink)
oShellLink.TargetPath = “\okcsxds01TSJobsactiveENG” & job & “”
oShellLink.Description = JobDescription
oShellLink.WorkingDirectory = “\okcsxds01TSJobsactiveENG” & job & “”
Any help/suggestions would be greatly appreciated.