Solved

Batch file

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

828 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