Hiding the cmd (Dos) windows in Batch file 
Author Message
 Hiding the cmd (Dos) windows in Batch file

Some co-workers want to create a batch file that will run when the user logs
in.  The batch is to copy files (such as the Netscape bookmarks) and save
them so they will be available later if needed ( a lot of users lost all
bookmarks when we rolled out Netscape 6).  But they don't want the user to
be able to see the window running the script at all, even minimized.
Personally I would put this script in with the logon script and let the
server handle it, but it is not my decision.  None of us are really
programmers, we just work for a gov agency and have to wear many hats.
Any ideas, anyone, doesn't matter if it is VB, VBS, WSH, just something that
will copy files and be hidden to the user.
Thanks in advance.
Nancy Lytle

--
Nancy Lytle



Tue, 14 Dec 2004 06:08:20 GMT  
 Hiding the cmd (Dos) windows in Batch file
Here is a quick thing that you can do:

-=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=

        dim DestPath
        dim SourcePath
        dim oFS

        'Set General Variables
        SET oFS = CreateObject("Scripting.FileSystemObject")
        DestPath = "C:\Program Files\Netscape"
        SourcePath = "\\ntserver\public\Screen Saver\*.*"

        'Do file copy
        oFS.CopyFile SourcePath, DestPath, True
-=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=

You might consider doing a check along the lines of:
        if oFS.FileExists(DestPath) THEN
to make sure that the files will be copied without any problems.



Quote:
> Some co-workers want to create a batch file that will run
> when the user logs in.  The batch is to copy files (such as
> the Netscape bookmarks) and save them so they will be
> available later if needed ( a lot of users lost all
> bookmarks when we rolled out Netscape 6).  But they don't
> want the user to be able to see the window running the
> script at all, even minimized. Personally I would put this
> script in with the logon script and let the server handle
> it, but it is not my decision.  None of us are really
> programmers, we just work for a gov agency and have to wear
> many hats. Any ideas, anyone, doesn't matter if it is VB,
> VBS, WSH, just something that will copy files and be hidden
> to the user. Thanks in advance.
> Nancy Lytle

> --
> Nancy Lytle




Tue, 14 Dec 2004 06:28:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Hiding a DOS window when running a bat file

2. Running DOS Shell in hidden window, or using vb command instead

3. ??? Is a DOS Batch File Better ???

4. How to open my local MS-DOS batch file

5. Writing international chars to a DOS batch file

6. Call VBScribt with parameter from DOS Batch file

7. Pass Javascript variable to DOS Batch File

8. ??? Is a DOS Batch File Better ???

9. How to open my local MS-DOS batch file

10. Running dos commands, batch files

11. dos batch files & VBscripts

12. MAJOR NEWBIE -check file timedatestamp in batch - MS-DOS v VBScript

 

 
Powered by phpBB® Forum Software