Solved

Batch file

Posted on 2004-10-06
4
224 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
ID: 12246991
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
ID: 12246997
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
ID: 12289280
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
ID: 12308878
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

776 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