Sign in to follow this  
Followers 0
mani

copy script

9 posts in this topic

#1 ·  Posted (edited)

hi everyone,

i need a script to copy a shortcut from my system to another on my network

i need the script to prompt for a computer name and when given transfers the shortcut file "link" to that machine's desktop to be run by the user

all machines are running windows xp

thanks everyone !

Edited by mani

Share this post


Link to post
Share on other sites



InputBox()

FileCreateShortcut()

possibly:

FileInstall()

Better question: Is AutoIt really what you want/need? You'd need Remote Desktop, or at the very least, permission to copy into the user's @DesktopDir.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Of the top of my head. Untested:

Global $link = @DesktopDir & "\my_shortcut.lnk"
Global $inputbox = InputBox("What's the computer name?", "Please provide Computer Name?")

FileCopy($link, "\\" & $inputbox "\c$\Documents and Settings\All users\Desktop")

Keep in mind that you have to have actual access rights on that machine to be able to put file on it. Also there's no error checking in place.


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

didn't work guys error in expression

Share this post


Link to post
Share on other sites

What does the console show in SciTE?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

line 5

filecopy($link "\\" & $inputbox "\c$\documents and settings\all users\desktop")

filecopy($link, ^ERROR

Error: error in expression.

Edited by mani

Share this post


Link to post
Share on other sites

line 5

filecopy($link "\\" & $inputbox "\c$\documents and settings\all users\desktop")

filecopy($link, ^ERROR

Error: error in expression.

You forgot a comma between $link and "\\"


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

done still not happening it runs but when i give it the computer name or click cancel it does error

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