Jump to content

Users Save to folder


Recommended Posts

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.

Link to comment
Share on other sites

@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 by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

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.html

For 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 again

There 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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

...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 by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

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, etc

8)

NEWHeader1.png

Link to comment
Share on other sites

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 here

http://www.jrsoftware.org/isinfo.php

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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/

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...