Jump to content

Complex Startup folder issue

Recommended Posts

Okay I'm needing some assistance with a problem I'm trying to work out.

What I'm looking to do is place a shortcut\script\batch\... what ever :ph34r: into the start folder of all current user accounts and the default account, I can't simply place link or file into the allusers account since the file is only meant to be ran once, and it must be ran by each and every existing account, and any future accounts...thus why it must also be placed in the default user account. So basically the file runs then self deletes, for the account that it has been executed on.

I'm using this for a deployment of the Firefox browser....the problem isn't the browser but the deploying of the extensions for it. Which only deploy per account they are installed on...and not done globally.

So any one with any idea's on how to approch this with AutoIt or other wise...I'm all ears.

Oh and thanks for your time reading this and mucho thanks for any assistance. :(

Also I didn't notice any macro for "Documents and Settings"...or did I miss some thing?

Okay working off some sample code in the help file I got this so far...and well it looks very hap-hazard. :lol:

; Shows the filenames of all files in the current directory, note that "." and ".." are returned.
$search = FileFindFirstFile( @HomeDrive & "\Documents and Settings\*.*")

; Check if the search was successful
If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")

While 1
    $file = FileFindNextFile($search) 
    If @error Then ExitLoop
    If $file <> "NetworkService" AND $file <> "LocalService" AND $file <> "All Users" AND $file <> "." AND $file <> ".." Then
     FileCopy(@ScriptDir & "\Bin\FireFox_Prep.txt", @HomeDrive & "\Documents and Settings\" & $file & "\Start Menu\Programs\Startup\*.*")
     MsgBox(4096, "File:", "File copied to " & $file & "\Start Menu\Programs\Startup")

; Close the search handle
Edited by Nologic
Link to post
Share on other sites

Why don't you try it the other way round?

Place your copying script in the "all users" start folder and let that script place a flag in the registry (in HKEY_CURRENT_USER of course :ph34r:) if it has already run.

If you still want to place it in every single Start Folder try reading them out of

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList


I hope that helps.



Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...