jp10558 Posted November 10, 2014 Share Posted November 10, 2014 So I have a need to create a bunch of shortcuts in a user logon script to network shares that may or may not be accessible. The problem I'm having is for my 15 or so shortcuts, it's taking 9 minutes to create all of them. I don't know why, I'm guessing Windows timeouts on the shares that aren't there. Is there a quicker way to create these shortcuts than FileCreateShortcut, or some flag to just create all of them in parallel? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 10, 2014 Moderators Share Posted November 10, 2014 Why not first check for the directory on the share, and then create your shortcut? Something like this: Local $aArray[5] = ["N:\Share", "H:\", "I:\IS", "T:\Bridger", "W:\Information Services"] Local $x = 1 For $sDir In $aArray If FileExists($sDir) Then FileCreateShortcut($sDir, @DesktopDir & "\Shortcut " & $x) $x +=1 EndIf Next "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now