webForumDet fria alternativet

"Logga ut" dialogruta?

.NET

2 svar · 237 visningar · startad av Melea

Medlem sedan juli 20033 147 inlägg
Frågan#1

Tjenamors!

Undrar hur man skriver för att få upp XP:s "Logga ut" dialogruta, som kommer upp om man trycker på "Logga ut" på startmenyn.
För att få upp "Stäng av" rutan skriver man

Dim objShell 
Set objShell = CreateObject("Shell.Application") 
objShell.ShutdownWindows

Har testat med LogoutWindows och LogoffWindows, men inga av de funkar.

Tack på förhand

Medlem sedan nov. 20017 144 inlägg
#2

Du kan använda shutdown, men då får du inte upp dialogrutan.

Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]
No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [ u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)

Medlem sedan juli 20033 147 inlägg
#3

Jo, har också kollat på det. Anyhow, detta är inte aktuellt längre då jag skippade idéen. :)

Tack för hjälpen iallafall Jesper T!

262 ms totalt · 4 externa anrop · v20260731065814-full.86ec41c2
129 ms — deklarationer (db)
0 ms — hämta statistik (cache)
129 ms — hämta tråd, inlägg och bilagor (db)
129 ms — ändringar (db)