Sign in to follow this  
Followers 0
minnie mouse

Please help me and my short cut

7 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



it works for me, when I had that directory created... do check to see if it exist exactly as it stands, I got no error message if it didn't exist.


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

Share this post


Link to post
Share on other sites

it works for me, when I had that directory created... do check to see if it exist exactly as it stands, I got no error message if it didn't exist.

just tried again

when i check the shortcut tharget its in quotes...... when i remove them it works...

:)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

but autoit is adding the quotes to the target...... which stops the shortcut working

how do i stop it?

:)

Edited by minnie mouse

Share this post


Link to post
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.

Share this post


Link to post
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") )

Thats great it works!!! :D:D:):P

Share this post


Link to post
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
Sign in to follow this  
Followers 0