Jump to content
Sign in to follow this  
Tapeworm

run script on logoff (?)

Recommended Posts

Tapeworm

Im trying to make a script that deletes a certain folder on logoff. And i have no idea how to make a script run on logoff...

Anyone got any ideas on how to accomplish this?

i need something like:

Filecopy("name.exe", @StartupCommonDir & "\name.exe")

just that i need it for "@Shutdowncommondir", which i know doesnt exist...

Share this post


Link to post
Share on other sites
zorphnog

Depends on the OS. In XP I add my scripts through group policy (User Configuration->Windows Settings->Scripts (Logon/Logoff)).

Share this post


Link to post
Share on other sites
Tapeworm

hm didnt think of that, its "gpedit.msc" right?

Share this post


Link to post
Share on other sites
Swift

This question has already been asked by me.

Do a forum search for this.

Helpful information:

To use this method, you must create a gui window (Don't show it if nessesary) And then use GUIRegistry() to set this specific code! :D

Share this post


Link to post
Share on other sites
Tapeworm

alright, thanks ill have a look into it :D

Edited by tapeworm09

Share this post


Link to post
Share on other sites
zorphnog

GUIRegistry? Do you mean GUIRegisterMsg with WM_QUERYENDSESSION?

Share this post


Link to post
Share on other sites
Swift

Yep! My bad...short-term memory loss! :D

Share this post


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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.