Jump to content
Sign in to follow this  
mani

copy script

Recommended Posts

mani

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
Blue_Drache

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
MadBoy

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
weaponx

What does the console show in SciTE?

Share this post


Link to post
Share on other sites
mani

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
Blue_Drache

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
mani

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.