Basic Login script

C

Clynch

I would like to run a small .exe file on my Win2K Server
in order to take inventory on the clients machine.
I need to place the .exe in the login script but never
done this before. The program is in a shared folder that
all users have access to. the path is

\\ace-file01\SHARED\InventoryData\AceAssets\clientcon.exe\

How would I write this in my Login.bat file??????

Thanks
 
M

manav

You could try

net use x: \\shared
if exists \\shared\inventorydata\aceassets\clientcon.exe
(continue from the line above)goto end
:end
net use x: /disconnect

cheers
 
D

Daniel Chang [MSFT]

Can't you just execute from within your login.bat file?

LOGIN.BAT
--
@echo off
\\ace-file01\shared\inventorydata\aceassets\clientcon.exe
--

--
Daniel Chang
Server Setup Team

Search our Knowledge Base at http://support.microsoft.com/directory
Visit the Windows 2000 Homepage at
http://www.microsoft.com/windows2000/default.asp
See the Windows NT Homepage at http://www.microsoft.com/ntserver/

NOTE: Please reply to the newsgroup and not directly to me. This allows
others to add to and benefit from these threads and also helps to ensure a
more timely response. Thank you!
This posting is provided "AS IS" without warranty either expressed or
implied, including, but not limited to, the implied warranties of
merchantability or fitness for a particular purpose.
The views and opinions expressed in this newsgroup posting are mine and do
not necessarily express or reflect the views and / or opinions of Microsoft.
 
P

Pegasus \(MVP\)

While the basic idea of this post is good, it contains several
errors and omissions that prevent it from running properly.
Try this instead:

- Create a batch file called "netlogon.bat" in this folder:
"c:\documents and settings\all users\start menu\programs\startup"
- Put the following lines into netlogon.bat:
@echo off
net use x: \\ace-file01\SHARED
if exist x:\InventoryData\AceAssets\clientcon.exe
x:\InventoryData\AceAssets\clientcon.exe
(unwrap this line!)
net use x: /d
 
G

Guest

-----Original Message-----
While the basic idea of this post is good, it contains several
errors and omissions that prevent it from running properly.
Try this instead:

- Create a batch file called "netlogon.bat" in this folder:
"c:\documents and settings\all users\start menu\programs\startup"
- Put the following lines into netlogon.bat:
@echo off
net use x: \\ace-file01\SHARED
if exist x:\InventoryData\AceAssets\clientcon.exe
x:\InventoryData\AceAssets\clientcon.exe
(unwrap this line!)
net use x: /d



I can see how this helps for one pc. I want to put this
i=on the server and have it run when people logon. I dont
want to go to all machines and add this bat file to it.
 
P

Pegasus \(MVP\)

i=on the server and have it run when people logon. I dont
want to go to all machines and add this bat file to it.

In this case it becomes an issue for your system administrator.
The following questions are important:
- Do your users get validated by a domain controller?
- Do their accounts have a logon script name?
- Should the script execute at every log on, or just once?
- Do all users have appropriate access to \\ace-file01\SHARED?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top