Script?

D

Dan

Hello,
I'm looking for some advice on the best way to make
a "pretty" interface for users for a logoff script. What
I'd like to do is present users with a simple Yes/No box
when they logoff. It'll be a simple question of whether
or not they'd like to sync a few "critical" directories up
with their personal space on the server. Technically it
won't be an issue using robocopy. What is more difficult
is how to make it look nice... I'd rather not have a DOS
prompt but that's the only way I know to make it work at
this point.
Any suggestions? Starting points?
Thanks,
Dan
 
A

Andrew Mitchell

Dan said:
Hello,
I'm looking for some advice on the best way to make
a "pretty" interface for users for a logoff script. What
I'd like to do is present users with a simple Yes/No box
when they logoff. It'll be a simple question of whether
or not they'd like to sync a few "critical" directories up
with their personal space on the server. Technically it
won't be an issue using robocopy. What is more difficult
is how to make it look nice... I'd rather not have a DOS
prompt but that's the only way I know to make it work at
this point.
Any suggestions? Starting points?
Thanks,
Dan

How about vbscript? Try the following - Saved as a .vbs file (watch for line
wrapping).

Dim lngRetval
lngRetVal = msgbox("Would you like to synchronize your files now?",vbYesNo,
"File Synch")
if lengRetval = vbYes then
Dim objShell
Set objShell = WScript.CreateObject ("WSCript.shell")
'***** This is where you tell the script to run your batch file *******
objShell.run "YourBatchFilename.bat"
Set objShell = Nothing
end if
 
Y

Yevgen Lazaryev

....Andrew watch for your syntax ...:)

Dim lngRetval
.....
if lengRetval =

"Andrew Mitchell" <[email protected]> a écrit dans le message
de | "Dan" <[email protected]> said
|
| > Hello,
| > I'm looking for some advice on the best way to make
| > a "pretty" interface for users for a logoff script. What
| > I'd like to do is present users with a simple Yes/No box
| > when they logoff. It'll be a simple question of whether
| > or not they'd like to sync a few "critical" directories up
| > with their personal space on the server. Technically it
| > won't be an issue using robocopy. What is more difficult
| > is how to make it look nice... I'd rather not have a DOS
| > prompt but that's the only way I know to make it work at
| > this point.
| > Any suggestions? Starting points?
| > Thanks,
| > Dan
|
| How about vbscript? Try the following - Saved as a .vbs file (watch for
line
| wrapping).
|
| Dim lngRetval
| lngRetVal = msgbox("Would you like to synchronize your files
now?",vbYesNo,
| "File Synch")
| if lengRetval = vbYes then
| Dim objShell
| Set objShell = WScript.CreateObject ("WSCript.shell")
| '***** This is where you tell the script to run your batch file
*******
| objShell.run "YourBatchFilename.bat"
| Set objShell = Nothing
| end if
|
|
| --
| Andy
 
A

Andrew Mitchell

Yevgen Lazaryev said:
...Andrew watch for your syntax ...:)

Dim lngRetval
....
if lengRetval =

Whoops!!
That's what you get for coding off the top of your head without testing
it....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Logoff Script help? 1
Logoff Script for Reminder Message 0
Shutdown on Logoff 1
Logon Scripts in GPO 5
PERSONAL script to run at logoff?? 5
XP Security Log Script 2
Logon Script registry check how to? 2
AppData 1

Top