Solved

Batch file

Posted on 2004-10-06
4
223 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 7 Update hangs indefinitely after reinstall 32 114
WinSetup from USB not cooperating 27 78
HP  Pavilion g4 Laptop can't find media for factory restore 6 32
Doubt. 2 56
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

912 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

19 Experts available now in Live!

Get 1:1 Help Now