mani Posted November 1, 2007 Share Posted November 1, 2007 (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 November 1, 2007 by mani Link to comment Share on other sites More sharing options...
Blue_Drache Posted November 1, 2007 Share Posted November 1, 2007 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 Link to comment Share on other sites More sharing options...
MadBoy Posted November 1, 2007 Share Posted November 1, 2007 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) Link to comment Share on other sites More sharing options...
mani Posted November 1, 2007 Author Share Posted November 1, 2007 thank you! Link to comment Share on other sites More sharing options...
mani Posted November 2, 2007 Author Share Posted November 2, 2007 didn't work guys error in expression Link to comment Share on other sites More sharing options...
weaponx Posted November 2, 2007 Share Posted November 2, 2007 What does the console show in SciTE? Link to comment Share on other sites More sharing options...
mani Posted November 2, 2007 Author Share Posted November 2, 2007 (edited) line 5filecopy($link "\\" & $inputbox "\c$\documents and settings\all users\desktop")filecopy($link, ^ERRORError: error in expression. Edited November 2, 2007 by mani Link to comment Share on other sites More sharing options...
Blue_Drache Posted November 2, 2007 Share Posted November 2, 2007 line 5filecopy($link "\\" & $inputbox "\c$\documents and settings\all users\desktop")filecopy($link, ^ERRORError: error in expression.You forgot a comma between $link and "\\" Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
mani Posted November 2, 2007 Author Share Posted November 2, 2007 done still not happening it runs but when i give it the computer name or click cancel it does error Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now