Solved

Batch file

Posted on 2004-10-06
4
222 Views
Last Modified: 2013-12-28
Hi Guys,

I use kixtart95 for as the logon script on my network. I was wondering whether it would be possible to attach a batch file to it that could be used to copy various dll's, pnl's etc to a designated folder on the PCs when they logon to the network?

Hope that makes sense.

Regards

Notorious.......
0
Comment
Question by:Notorious
  • 3
4 Comments
 
LVL 1

Expert Comment

by:GlenmoranUK
Comment Utility
Yes it can..  

But it depends on what you need to do and whether what you want to do will require admin rights on the users machine.

To run a batch file in Kix use this command:

Run '%COMSPEC% /e:1024 /c "Path and name of batch file"'

Now heres the clever bit...  Say you needed to run this script and it needed admin rights but the users were just standard users..  What I did was create a specific NT account and made it a member of the domain admins group.  Now I call my batch program using this script:

SetTitle ("TITLEHERE")
Run '%COMSPEC% /e:1024 /c runas /user:[DOMAIN]\[USER] "Path and name of batch file"'
$trash= SetFocus ("Maxadm")
Sleep 3
$trash= SendKeys("kixtart{PASSWORD}")

I actually encrypt my script using kixcrypt (see www.kixtart.org) to prevent users from reading the password.

Hope this helps

G
0
 
LVL 1

Expert Comment

by:GlenmoranUK
Comment Utility
Just noticed a mistake above..  

$trash=SetFocus("Maxadm")  should read:

$trash=SetFocus("TITLEHERE")

You need to set the title name and the set focus to be the same for the script to work..

Sorry

G
0
 

Author Comment

by:Notorious
Comment Utility
Sorry guys,

Thanks for the above. However my script writing skills are limited. What would such a script look like?

Regards

Notorious..........
0
 
LVL 1

Accepted Solution

by:
GlenmoranUK earned 50 total points
Comment Utility
Erm..   Like the above.

It depends what you want to do.  Have a look at www.kixtart.org for loads of sample scripts.

G
0

Featured Post

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Join & Write a Comment

For a variety of reasons, it sometimes makes sense to reboot a Windows-based computer on a regular, perhaps daily basis. This "cures" a lot of ills by resetting processes, flushing caches, refreshing memory, and reestablish network connections. In a…
Update 11/3/2014 - Although the below article will get you to relocate the WINSXS folder, Microsoft has finally released a utility to reduce the size of the WINSXS folder. For some reason, it's not that straightforward. It only works on Windows 2008…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now