Hi, I would like to know how can I stop windows from logging off, restart or shutdown. I want to automatically pause these operations and then send a signal to USB port and then resume the shutdown, log off or restart operation. Is it possible you can help me write the code or give me some guidelines on it as I am learning VB thanks in advance
badbloodyeyez 0 Light Poster
Recommended Answers
Jump to PostPrivate Sub Form_QueryUnload(Cancel as Integer, UnloadMode as Integer) if UnloadMode = vbAppWindows then ' // Windows Is Shutting Down ' // Instead Of This Stuff, Send Signal To USB Port retval = msgbox("Really Shutdown Windows", vbyesno) if retval = vbno then AbortSystemShutdown vbnullstring ' // Abort Localhost …
Jump to PostCompile it... put the EXE in the folder that you want to run it from, and then run it.
Jump to PostAs far as needing to change the wsh.regwrite line, no. It is fine the way it is... basically, app.exename is sort of like a variable that contains the name of the program... so, if someone changed the exe name from reprieve.exe to fun.exe, then app.exename would become fun. Then, app.path …
All 12 Replies
selvaganapathy 31 Posting Pro
Comatose 290 Taboo Programmer Team Colleague
badbloodyeyez 0 Light Poster
Comatose 290 Taboo Programmer Team Colleague
badbloodyeyez 0 Light Poster
Comatose 290 Taboo Programmer Team Colleague
badbloodyeyez 0 Light Poster
Comatose 290 Taboo Programmer Team Colleague
badbloodyeyez 0 Light Poster
badbloodyeyez 0 Light Poster
Satishsr 0 Newbie Poster
Satishsr 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.