Jump to content

Recommended Posts

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
Posted

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

Posted

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)

Posted (edited)

line 5

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

filecopy($link, ^ERROR

Error: error in expression.

Edited by mani
Posted

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

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
×
×
  • Create New...