Jump to content

DOS CMD window stays open. How to close?


Syekick
 Share

Recommended Posts

The following runs and works fine. However, at the end, a DOS Command window stays open. How do I close that puppy?

Run(@Comspec & ' /k cipher /x c:\' & @UserName & "_" &@ComputerName & '.pfx', 'c:\')

WinWaitActive ("EFS certificate and key backup")

Send("{Enter}")

Send("{Enter}")

Send("{Enter}")

;The window above is the one that stays open.

Sleep(100) ;100 milliseconds

Run('net.exe use U: "\\testsvr\keysafe"')

Sleep(250) ;250 milliseconds

FileCopy ("c:\*.pfx", "u:")

Sleep(250) ;250 milliseconds

FileDelete("c:\*.pfx")

Sleep(50) ;50 milliseconds

Run("net.exe use /delete U:")

Link to comment
Share on other sites

The following runs and works fine. However, at the end, a DOS Command window stays open. How do I close that puppy?

Run(@Comspec & ' /k cipher /x c:\' & @UserName & "_" &@ComputerName & '.pfx', 'c:\')

WinWaitActive ("EFS certificate and key backup")

Send("{Enter}")

Send("{Enter}")

Send("{Enter}")

;The window above is the one that stays open.

Sleep(100) ;100 milliseconds

Run('net.exe use U: "\\testsvr\keysafe"')

Sleep(250) ;250 milliseconds

FileCopy ("c:\*.pfx", "u:")

Sleep(250) ;250 milliseconds

FileDelete("c:\*.pfx")

Sleep(50) ;50 milliseconds

Run("net.exe use /delete U:")

Change /k to /c

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...