Jump to content

Please help me and my short cut


Recommended Posts

Hi all, could some one please give me some help. i have the following line in my code

FileCreateShortcut ('%windir%\explorer.exe /n,/root,' & EnvGet("HOMESHARE"), $profile & "\Local Settings\Offline Cache\My Network Area.lnk")

it creates a shortcut with a target of "%windir%\explorer.exe /n,/root,\\nhs-sr-002\user$"

it dosnt work cos of the quotes (") at the being an the end, how can I remove them so it sets the target to

%windir%\explorer.exe /n,/root,\\nhs-sr-002\adamw$

Thanks

Miss Mouse

Edited by minnie mouse
Link to comment
Share on other sites

works with both " and ' for me... but if it works without quotes, use that way :)

edit:

Ah.... I see what you mean, I missread the question (stoopid) it's the target that is faulty... I'll see if I can see what the problem is.

Edited by jinxter

> there are 10 types of people in the world, those who understand binary and those who don't.

Link to comment
Share on other sites

This one works... add the ,/n,/root as arguments instead...

FileCreateShortcut (@WindowsDir & "\explorer.exe ",  $profile & "\Local Settings\Offline Cache\My Network Area.lnk",@WindowsDir,"/n,/root," & EnvGet("HOMESHARE") )

> there are 10 types of people in the world, those who understand binary and those who don't.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...