Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Script

Status
Not open for further replies.

Edge07

MIS
Oct 20, 2003
15
CA
I have created a logon script that maps users to vareious drives based on group memberships. Also in this logon script i have paced a command that runs a program that scans the client computer for hardware and software configurations. The problem I am having is that the batch file is running minimized and users tend to open the window and close it down before the script finishes. I want a way to disable the close button on the commad window so that the script must finish or to hide the window all together. I know there is a way i can do this on each persons client but most users reside in a reomte area and I cannot do a desk visit to each.
Any help would be appreciated thanks.
 
You might want to consider rewriting the Logon script in vbscript. It is more robust than batch, and you can easily do what you are wanting to do but instead of disabling the close button, you can make the command window invisible to the user so they never even see it. Just an Idea.

Z
 
Can u point me to a place where i might find an example of how do to this.
 
Sure thing, post up your question in the vbscript forum and maybe even the batch file that you are currently using. Tell them you are a vbscript "noob" and you would like some help rewriting this batch in vbscript, also tell them why. There are some great script writers over there, and are always willing to help.

Z
 
Thanks,

But i am trying to find how i would run the following?

start \\server\trackit\audit32.exe


I am applying the scripts by having a batch file call the VBScript. Seems to be working pretty good so far.
 
Edge07,

You can run executables in vbscript by setting a shell environment like so:

Set wshShell = Wscript.CreateObject("Wscript.Shell)

Then you can run the exe file like so.

wshShell.run ("cmd.exe /c \\server\trackit\audit32.exe),0,True

You can follow it easily, the 0 tells it not to show the command window, and True means to wait until it is finished before running the next line in the script.

Hope this points you in the right direction.

Z
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top