02-01-2010 11:08 PM
Hi Guru,
I understand what Hu Yu wants to say.
But currently i have c drive only. So i cant create a shortcut at the same folder . I want to direct my .Ink file to desktop. To send to the desktop the link can't send as we did create folder in other driver such as example tht Hu Yu given.
Please guide me how to do link the .Ink to desktop not to other drive.
Please help thank you.
02-01-2010 11:27 PM
So this is the true problem.
You can use some specified characters to locate desktop
the following example create a shortcut Win.lnk on the Desktop which point to the C:\Windows folder
shortcut /f:"%USERPROFILE%\Desktop\Win.lnk" /a:c /t:C:\Windows
02-01-2010 11:41 PM - edited 02-01-2010 11:50 PM
If windows XP is installed in the PC then the Path of the desktop could be "C:\Documents and Settings\XXX\Desktop"
here "XXX" is the username.
you can get the information regarding the current logged in user through some user32.dll (i guess) and can create the above path.
Just give it a try once.
Also there might be chance that the LV application which creates this shortcut file on the dektop for a certain user might not have the "write" permission and you may fail. Check for these and do reply in case you are sucesful
02-02-2010 12:38 AM
Hi,
I have tried this but it says..shortcut is not recognized..i have attached the testing i made..please help.thank you
02-02-2010 12:46 AM - edited 02-02-2010 12:48 AM
You can
DOWNLOAD the shortcut.exe form here,
copy the shortcut.exe to C:\Documents and Settings\Administrator\
then run the command at C:\Documents and Settings\Administrator\ path
And Note:
thats Win.lnk(short for link), not ink
02-02-2010 01:11 AM
Im sorry again Hu Yu,
How to run the command ? so i can get C:\Documents and Settings\Administrator\ path
sorry im really dumb in this dos commands. Please help thank you
02-02-2010 01:18 AM
Under CMD
Use C: to change to disk C
Use cd <folder name> to change to the specified folder
You may pay attention to the underlined path, that's your current working path, you just make sure the current working path is the same as you shortcut.exe's path, that should work
02-02-2010 01:25 AM
NIhuyu wrote:So this is the true problem.
You can use some specified characters to locate desktop
the following example create a shortcut Win.lnk on the Desktop which point to the C:\Windows folder
shortcut /f:"%USERPROFILE%\Desktop\Win.lnk" /a:c /t:C:\Windows
Is there a chance that %USERPROFILE%\Desktop is called something else in non English Windows versions????
02-02-2010 01:31 AM
I gave that a try on Windows XP Chinese version.
It works. But I don't know the result for other languages of Windows XP.
02-02-2010 01:39 AM
Its works..Thank you Hu Yu.
So if i wana do in labview 8.0, is it i need to run each command one by one till the last ?