|
-
Feb 11th, 2010, 08:02 AM
#1
Thread Starter
Lively Member
Run VB6 Program At SHUTDOWN
Hello,
I wrote a code to Lock Folders on my disk. I wanted to trigger it when I SHUTDOWN my computer.
Is it possible ?? Is there any registry key which will help me ?
I dont want my program to run all throughout. It should only start when Shutdown of the computer is going to take place.
Thanks in Advance !!
PAIN n SUFFERING-Pain is Inevitable,,suffering is optional...........
WORK EXPECTATION--U can do anything in this world if u don't look for credit.........
-
Feb 11th, 2010, 08:10 AM
#2
Re: Run VB6 Program At SHUTDOWN
Find the gpedit.msc on your machine and open it. (click on Start Button. Type gpedit.msc in the run)
Under the Computer configuration in the Windows Settings folder, you can specify scripts to run at Startup/Shutdown. Under the User configuration in the Windows Settings folder you can specify scripts to run at Logon/Logoff. Use the Logoff script if your program needs network access.
Last edited by Siddharth Rout; Feb 11th, 2010 at 08:16 AM.
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Feb 11th, 2010, 08:21 AM
#3
Frenzied Member
Re: Open Program when Computer SHUTSDOWN -- VB6
When the MS OS decides to shut down, it starts removing programs from memory, then services and such, so I doubt that it will allow your program to run at shutdown. So you may be stuck with having it running prior to the OS shutting down. Then, since you are depending upon the OS to send you a message that it is shutting down, it may just terminate your program if you take too long doing what you want to do. Another consideration is what happens to the OS if those folders are needed by the system (See BSOD). After that, if your program does not run at startup, how do those folder get unlocked?
Now, if this is for an application then why don't you lock the folders when the application shuts down and unlock them when it starts up???
Good Luck
Option Explicit should not be an Option!
-
Feb 11th, 2010, 12:01 PM
#4
Re: Run VB6 Program At SHUTDOWN
Duplicate Threads Merged
One topic, one forum section, one thread please.
-
Feb 11th, 2010, 01:18 PM
#5
Thread Starter
Lively Member
Re: Run VB6 Program At SHUTDOWN
no..its actually for something else....my brother often wants to login onto my computer....i dont want him to see my files.....i created another user for him.....so whenever I log off.....i wanted to lock the files........
I had a simpler method.....that is.....on startup(other user)....the folders get locked....but I can only lock them as an Admin.....thats why !!!
PAIN n SUFFERING-Pain is Inevitable,,suffering is optional...........
WORK EXPECTATION--U can do anything in this world if u don't look for credit.........
-
Feb 11th, 2010, 01:18 PM
#6
Thread Starter
Lively Member
Re: Run VB6 Program At SHUTDOWN
@HAck.....sorry......I actually didnt kno which Forum to post it in...!!
PAIN n SUFFERING-Pain is Inevitable,,suffering is optional...........
WORK EXPECTATION--U can do anything in this world if u don't look for credit.........
-
Feb 11th, 2010, 01:48 PM
#7
Re: Run VB6 Program At SHUTDOWN
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Feb 11th, 2010, 03:12 PM
#8
Thread Starter
Lively Member
Re: Run VB6 Program At SHUTDOWN
Yes...I did....!!!!! Thnx !!!!
PAIN n SUFFERING-Pain is Inevitable,,suffering is optional...........
WORK EXPECTATION--U can do anything in this world if u don't look for credit.........
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|