Script?

  • Thread starter Thread starter Dan
  • Start date Start date
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
 
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
 
....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
 
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....
 
Back
Top