possy_99 Posted August 23, 2005 Posted August 23, 2005 (edited) hi all, just reg'd although I have been learning myself auto-it for a little while now, but I've came across this problem I'm hopeing someone can help me with. I'm using auto it to automatically install certain programs, and I've got quite far thanks to the help files and example scripts. The problem comes when trying to move or delete unwanted desktop icons, some are in all users\desktop and some go in user profiles. I've been using this in my scripts: FileMove("C:\Documents and Settings\All Users\Desktop\shortcut.lnk", "C:\Documents and Settings\User\Application Data\Microsoft\Internet Explorer\QUICK LAUNCH\",1) this worked fine when the shortcut is in all users\desktop but when the shortcut is in the user profiles desktop I have been using batch files and dos variables to locate the current logged on user ect. I have discovered the macros in auto-it, but have never used them before. Here's what I have at the moment: FileMove("@DesktopCommonDir\shortcut.lnk", "@AppDataCommonDir\Microsoft\Internet Explorer\QUICK LAUNCH\") Now by looking at the help file I assume @DesktopCommonDir should give me the c:\documents and settings\all users\desktop path and the @AppDataCommonDir should give me C:\Documents and Settings\All Users\Application Data needless to say, it don't work. can anyone help me? Thanks! Edited August 23, 2005 by possy_99
AutoITPimp Posted August 23, 2005 Posted August 23, 2005 hi all, just reg'd although I have been learning myself auto-it for a little while now, but I've came across this problem I'm hopeing someone can help me with.I'm using auto it to automatically install certain programs, and I've got quite far thanks to the help files and example scripts. The problem comes when trying to move or delete unwanted desktop icons, some are in all users\desktop and some go in user profiles.I've been using this in my scripts:FileMove("C:\Documents and Settings\All Users\Desktop\shortcut.lnk", "C:\Documents and Settings\User\Application Data\Microsoft\Internet Explorer\QUICK LAUNCH\",1)this worked fine when the shortcut is in all users\desktop but when the shortcut is in the user profiles desktop I have been using batch files and dos variables to locate the current logged on user ect. I have discovered the macros in auto-it, but have never used them before. Here's what I have at the moment:FileMove("@DesktopCommonDir\shortcut.lnk", "@AppDataCommonDir\Microsoft\Internet Explorer\QUICK LAUNCH\")Now by looking at the help file I assume @DesktopCommonDir should give me the c:\documents and settings\all users\desktop path and the @AppDataCommonDir should give me C:\Documents and Settings\All Users\Application Dataneedless to say, it don't work. can anyone help me?Thanks!<{POST_SNAPBACK}>The problem is you didn't concatenate. Your file move is reading everything as one string not a macro concatenated with a string. Try the following:FileMove(@DesktopCommonDir & "\shortcut.lnk", @AppDataCommonDir & "\Microsoft\Internet Explorer\QUICK LAUNCH\")
Xenobiologist Posted August 23, 2005 Posted August 23, 2005 Hi,I also had a similarly problem. Don´t forget the correct ending of the filename.;Long way$1 = @DesktopDir & "\vmware.exe.lnk"$2 = @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch\vmware.exe.lnk"FileMove($1, $2);short wayFileMove(@DesktopDir & "\vmware.exe.lnk", @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch\vmware.exe.lnk");checkMsgBox(0, @DesktopDir & "\vmware.exe.lnk", $1)MsgBox(0, @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch\vmware.exe.lnk", $2)I used vmware.lnk instead of vmware.exe.lnk So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
MHz Posted August 23, 2005 Posted August 23, 2005 (edited) I used vmware.lnk instead of vmware.exe.lnk So long,Mega<{POST_SNAPBACK}>So VMWare use vmware.exe as the name of their shortcuts, that is weird.@possy_99Your problem is that you are not concatenating the code.Your codeFileMove("@DesktopCommonDir\shortcut.lnk", "@AppDataCommonDir\Microsoft\Internet Explorer\QUICK LAUNCH\")should be to add the blue parts and remove the red parts.FileMove("@DesktopCommonDir & "\shortcut.lnk", "@AppDataCommonDir & "\Microsoft\Internet Explorer\QUICK LAUNCH\")Oh, I see AutoITPimp shows this, I am just too slow. Edited August 23, 2005 by MHz
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