mpcluever Posted July 1, 2011 Share Posted July 1, 2011 (edited) I'm trying to use filecreateshortcut, but it will not put in the \\ in. I have a msgbox verifying that the \\ is there, but when it creates the shortcut, there's only 1. This will be used on a virtual pc, however it's doing it on my other computers as well. Windows XP.Any ideas? Thanks!!$Shortcut = "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE"" ""\\vmware-host\Shared Folders\RKT Files\Documents\Auto Update\Auto Update Generator.xltm" MsgBox(0, "", $Shortcut) FileCreateShortcut($Shortcut, "C:\Documents and Settings\1 IT\Start Menu\Programs\Startup\Auto Update Generator.lnk", "C:\Program Files\Microsoft Office\Office12") Edited July 1, 2011 by mpcluever Link to comment Share on other sites More sharing options...
LurchMan Posted July 1, 2011 Share Posted July 1, 2011 (edited) I'm trying to use filecreateshortcut, but it will not put in the \\ in. I have a msgbox verifying that the \\ is there, but when it creates the shortcut, there's only 1. This will be used on a virtual pc, however it's doing it on my other computers as well. Windows XP. Any ideas? Thanks!! $Shortcut = "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE"" ""\\vmware-host\Shared Folders\RKT Files\Documents\Auto Update\Auto Update Generator.xltm" MsgBox(0, "", $Shortcut) FileCreateShortcut($Shortcut, "C:\Documents and Settings\1 IT\Start Menu\Programs\Startup\Auto Update Generator.lnk", "C:\Program Files\Microsoft Office\Office12") Try this: $Shortcut = '"C:\Program Files\Microsoft Office\Office12\EXCEL.EXE" "\\vmware-host\Shared Folders\RKT Files\Documents\Auto Update\Auto Update Generator.xltm"' MsgBox(0, "", $Shortcut) FileCreateShortcut($Shortcut, "C:\Documents and Settings\1 IT\Start Menu\Programs\Startup\Auto Update Generator.lnk", "C:\Program Files\Microsoft Office\Office12") Your quotes weren't quite right - you can use single and double quotes together to achieve a double quote within a path specification. Edited July 1, 2011 by LurchMan Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end. Link to comment Share on other sites More sharing options...
mpcluever Posted July 1, 2011 Author Share Posted July 1, 2011 Same result 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