NSearch Posted August 3, 2005 Posted August 3, 2005 I am trying to write a script that I will distribute throughout our network, where when the user clicks on the autoit.exe button a script will access a network folder and save the file to the following path. C:\Documents and Settings\USERNAME\Application Data\Microsoft\Excel\XLSTART USERNAME will change for each user. Are there any functions that retrieve the path for this location? Thank you for your help in advance.
jftuga Posted August 3, 2005 Posted August 3, 2005 You can use the @UserName macro.See http://www.autoitscript.com/autoit3/docs/macros.htm-John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile
herewasplato Posted August 3, 2005 Posted August 3, 2005 (edited) @UserProfileDir Edit: I see that not only was I not as fast as jftuga - I was not as informative :-( Warning: Be aware that if you use @UserName... The username is not always the same as the active profile directory. Edited August 3, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
herewasplato Posted August 3, 2005 Posted August 3, 2005 Sorry to reply to my own post - but I had edited the other one enough times.I went looking for a web site that had already written out what I was attempting to convey in my last post:From http://www.oreilly.com/catalog/zeroadm/chapter/ch08.htmlFor example, if you delete a user account on an NT system, the link to the user profile associated with that account is broken. Creating a new user account with the same name will not re-establish this link, because the new account will have a different security ID from the old one. The next time the user logs on to the computer, the system will create a new profile directory by adding the extension .000 to the username. The new profile will contain the contents of the profile in the \Default User directory, just like that of any other new user. The original profile for the deleted user is effectively orphaned by the removal of that account, and will never be used by the system againThere are several other ways to have a mismatch between the user name and the active profile directory - hence @UserProfileDir [size="1"][font="Arial"].[u].[/u][/font][/size]
NSearch Posted August 3, 2005 Author Posted August 3, 2005 Change of plans. I just went around to everyone computer and created an alternative file path for Excel to start up. It is directly under the c:\. I am just going to create a simple webpage for them to visit and download to that folder when asked to via email. One other question not related to autoit, but maybe someone knows. When the link on the webpage is clicked, I would like for the file to save to the specific path that I created under c:\. Does anyone know the html code for this. Thanks.
herewasplato Posted August 3, 2005 Posted August 3, 2005 (edited) ...Does anyone know the html code for this...<{POST_SNAPBACK}>Nope... but do you have admin rights on each computer? You could just push the file via a script.edit: typo Edited August 3, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
NSearch Posted August 3, 2005 Author Posted August 3, 2005 I was originally planning on doing this, but I decided to just have them visit a website and download it. But I want to specify the "save to" path. Thanks
Valuater Posted August 3, 2005 Posted August 3, 2005 I was originally planning on doing this, but I decided to just have them visit a website and download it. But I want to specify the "save to" path.Thanks<{POST_SNAPBACK}>I use an installer... this puts the files where you want them and creates short-cuts, ini files, registry, etc, etc8)
Valuater Posted August 3, 2005 Posted August 3, 2005 (edited) First I dont suggest you build an installer in the middle of finishing this program and ... there are many on the net that are free. there is one that many here use and i couldn't find it right now.Hopefully someone will post it here.... but you can do a search on the net and find freeware for your installations.8)EDIT:found one herehttp://www.jrsoftware.org/isinfo.php8) Edited August 3, 2005 by Valuater
blindwig Posted August 3, 2005 Posted August 3, 2005 Try Nullsoft Scriptable Install System (NSIS) - it's the one that WinAmp uses, and I think AutoIt uses that one as well.Find it here:http://www.nullsoft.com/free/nsis/ My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions
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