can someone give me a reference to a code that makes the desktop refresh?
'STUDENT FOLDER SHORTCUT SCRIPT - Written By: Derek Perez '04
'============================================================
'Set All Used API
'=======================================
set ws_obj = WScript.CreateObject("WScript.Shell")
set fso_obj = CreateObject("Scripting.FileSystemObject")
trgt_folder = ws_obj.SpecialFolders("Desktop")
'Checking for Folder Existance Procedure
'=======================================
Dim fso_obj
if (fso_obj.FolderExists(trgt_folder & "\Student Applications")) Then
else
'Creating Folder IF NOT FOUND
'=======================================
set stdnt_folder = fso_obj.CreateFolder(trgt_folder & "\Student Applications")
'=======================================
'=======================================
'Now Placing Word 2003 in "Student Applications" Folder.
'=======================================
Set Shortcut = ws_obj.CreateShortcut(trgt_folder & "\Student Applications" + "\\Word 2003.lnk")
Shortcut.TargetPath = "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE"
shortcut.save
end if
thats what i have. the Folder does not show up until you refresh the desktop and i can not figure out why :/
Question
JadeWolf324
can someone give me a reference to a code that makes the desktop refresh?
'STUDENT FOLDER SHORTCUT SCRIPT - Written By: Derek Perez '04 '============================================================ 'Set All Used API '======================================= set ws_obj = WScript.CreateObject("WScript.Shell") set fso_obj = CreateObject("Scripting.FileSystemObject") trgt_folder = ws_obj.SpecialFolders("Desktop") 'Checking for Folder Existance Procedure '======================================= Dim fso_obj if (fso_obj.FolderExists(trgt_folder & "\Student Applications")) Then else 'Creating Folder IF NOT FOUND '======================================= set stdnt_folder = fso_obj.CreateFolder(trgt_folder & "\Student Applications") '======================================= '======================================= 'Now Placing Word 2003 in "Student Applications" Folder. '======================================= Set Shortcut = ws_obj.CreateShortcut(trgt_folder & "\Student Applications" + "\\Word 2003.lnk") Shortcut.TargetPath = "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" shortcut.save end ifthats what i have. the Folder does not show up until you refresh the desktop and i can not figure out why :/
any ideas?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts