Desktop shortcut creation flashes a cmd window on clients
I created two shortcut scripts with the Desktop Shortcut Wizard and it works perfect except I have it set to run once per day in case staff delete them and it's flashing a cmd window for a fraction of a second each time it runs. No, it's not a big deal except for the doctors who see it disagree. :-/
Is there a way to prevent this from occurring and still use the Desktop Shortcut Wizard?
I suppose I could do with AutoIT and hide the window, but if the wizard has a way to do, I'd prefer to use it.
Thanks
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
BHC-Austin
10 years ago
The Desktop Shortcut Wizard creates a script with a dependency called "ShortcutCreator.exe" and executes that dependency with various parameters. I've never used that wizard, but from the sounds of it that ShortcutCreator.exe is a console app, hence the brief flash of a cmd window.
Your best bet would be to script the creation of the shortcuts yourself, using VBScript or similar. If you're not familiar with VBScript, there are lots of examples out there that you could just copy/paste and edit accordingly.
Comments:
-
Thanks. AutoIT works well.
Guess I'll do it that way.
Seems a bit odd that Kace who is heavy into AutoIT wouldn't improve the ShortcutCreator.exe to hide that window.
Maybe in "the future"! - murbot 10 years ago
Posted by:
mramsdell
10 years ago
Have you tried running this under local system and not under a user? usually this keeps the user from seeing the cmd window.
Comments:
-
Yep. I thought the same thing, but the script default is to use the System account and I double checked after running it also. It definitely uses the System account.
No worries. I used the code below to build a small AutoIT shortcut creator for the two that I need. I can seem to find a way to wrap my code when repling in a comment field on ITNinja (feature request!!).
Thanks for the help those who chimed in.
CODE START
$sPrintersLNK = @DesktopDir & "\Printers.lnk"
$sNetworkLNK = @DesktopDir & "\Network.lnk"
$PRINTERS = FileCreateShortcut(@WindowsDir & "\System32\cpalaunch.exe", $sPrintersLNK, _
@SystemDir, "Printers", "NIDDK PowerBroker Printers", "Shell32.dll", "", "60")
$NETWORK = FileCreateShortcut(@WindowsDir & "\System32\cpalaunch.exe", $sNetworkLNK, _
@SystemDir, "Networks", "NIDDK PowerBroker Network", "Shell32.dll", "", "17")
CODE end - murbot 10 years ago
Posted by:
nshah
10 years ago
I just use the File Synch under Distribution to copy my shortcuts down to systems. Yes, I have to point to the desktop in the pathway but not a big deal. Plus it keep it persistent so that if anyone deletes it, at the next check in the shortcut returns.
Comments:
-
Interesting idea.
How do you point to the desktop for clients with different paths? Is there a variable you can use in the location field to point to the desktop and place the shortcut there?
We've got a mix of XP and Win 7. We'll probably have some XP machines sticking around for a while.
I suppose I could create multiple FS's, and point each one to the respective OS desktop path, but that almost seems like more trouble than it's worth. - murbot 10 years ago-
You are correct. I would be a different FS for each pathway, no variable. Seems like a lot of work but really it is just two sync and a copy/paste of pathway.
Its absolute and persistent as well.
You have to zip up shorts with FS no matter if it is one or more so if there are more that go on each OS, just zip them all together and create two, one for the XP path and one for Win 7.
It's just another option vs scripting. - nshah 10 years ago