Jump to content

Newbee question


Recommended Posts

I am sorry for asking such a simple question. i have been looking for the answers in the help documentation but have been unable to acomplish what i need to acomplish.. i will explain

all i need to do is this..

the Autoit script i will create will run automatically every time a user loges on.. however i would like the script to be able to determine if it has been run for the particular user that is currently logged on.. the script will then have two choice. if it has been run for this user then it will exit.. but if it has not been run then it will continue on.. i have completed the script and it works.. this part of it is all i need.. i have looked into somehow getting the script to write a file or dir named after the current user that ran the script then if the script looked at the current logged on user if could then look for a file or folder of that name and if it did exist then it would know that the script had been run and if it did not exist then it would continue to run finally creating this file or dir so not to run a second time the next time this user loges in.. .. i was also looking into the same method but instead of a file or dir to validate use a regwrite and regread.. please any suggestions would get great.. thank you for your help.. i am writing this in a hurry so i am sorry for all the errors..

thanks.

Link to comment
Share on other sites

HI,

so where is your problem? Use RegRead()

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

Link to comment
Share on other sites

You can drop a file (any file) in the @AppsDataDir or @TempDir which are located in the user's profile directory. Therefore, you can drop and read the file based on the currently logged on user.

As for the registry, do a RegWrite/RegRead to HKCU.

Link to comment
Share on other sites

You can drop a file (any file) in the @AppsDataDir or @TempDir which are located in the user's profile directory. Therefore, you can drop and read the file based on the currently logged on user.

As for the registry, do a RegWrite/RegRead to HKCU.

that sounds easy enough but what command to creat a dir in this folder i tried

DirCreate ( "@TempDir\test") this only creats a directory in the folder that the script is run..

you can see from my scripting that i am a newbee. please forgive. i am a quick learner thanks for the help..

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