Results 1 to 8 of 8

Thread: Run VB6 Program At SHUTDOWN

  1. #1

    Thread Starter
    Lively Member wiz....'s Avatar
    Join Date
    Nov 2008
    Location
    Asia, Earth, Solar System, Milky Way Galaxy, Near Andromeda Galaxy, Universe
    Posts
    78

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

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    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

  3. #3
    Frenzied Member
    Join Date
    Mar 2009
    Posts
    1,182

    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!

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Run VB6 Program At SHUTDOWN

    Duplicate Threads Merged

    One topic, one forum section, one thread please.

  5. #5

    Thread Starter
    Lively Member wiz....'s Avatar
    Join Date
    Nov 2008
    Location
    Asia, Earth, Solar System, Milky Way Galaxy, Near Andromeda Galaxy, Universe
    Posts
    78

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

  6. #6

    Thread Starter
    Lively Member wiz....'s Avatar
    Join Date
    Nov 2008
    Location
    Asia, Earth, Solar System, Milky Way Galaxy, Near Andromeda Galaxy, Universe
    Posts
    78

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

  7. #7
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Run VB6 Program At SHUTDOWN

    Did you see my post?
    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

  8. #8

    Thread Starter
    Lively Member wiz....'s Avatar
    Join Date
    Nov 2008
    Location
    Asia, Earth, Solar System, Milky Way Galaxy, Near Andromeda Galaxy, Universe
    Posts
    78

    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
  •  



Click Here to Expand Forum to Full Width