NT & .bat Question...
#1
We have an Internet Paging System to give work to our couriers. As a resourceful sort of chap, I now want it to alert me should I get a virus ( ).
We run NAI/Dr. Solomons & one of the options is to "on finding a virus" run a program.
Therefore, I have created a very simple batch file to
<B>@echo off
copy c:alert.pag q:</B>
This copies a pre-determined file (Quick There's a Virus u Plonker!) to a directory where the pager software takes it & sends it to me in a paging message.
Simple
Problem is...
If I do it from a cmd prompt - it works.
If I do it by Run command - it works.
If I do it by d/click on pager.bat in explorer - it works.
If I do it via NAI/Dr Solomons it doesn't work (0 files copied / file access denied)
Permisions/rights should be OK - ideas?
We run NAI/Dr. Solomons & one of the options is to "on finding a virus" run a program.
Therefore, I have created a very simple batch file to
<B>@echo off
copy c:alert.pag q:</B>
This copies a pre-determined file (Quick There's a Virus u Plonker!) to a directory where the pager software takes it & sends it to me in a paging message.
Simple
Problem is...
If I do it from a cmd prompt - it works.
If I do it by Run command - it works.
If I do it by d/click on pager.bat in explorer - it works.
If I do it via NAI/Dr Solomons it doesn't work (0 files copied / file access denied)
Permisions/rights should be OK - ideas?
#2
Scooby Regular
Join Date: Mar 2000
Location: Gloucestershire, home of the lawnmower.
Posts: 4,531
Likes: 0
Received 0 Likes
on
0 Posts
PTMW
I'm going to guess that the anti-virus software is smart and is thinking that when it runs this program that it is possibly doing more damage, so denies system level access to other drives while in "You have a Virus" mode. Maybe
I don't remember wht system we have in HQ but it actually locks the whole file system up until the action required is performed by the Admin.
Another option is to try and run this application from the Q drive.
I.e. put the following .bat in the a directory on the Q drive that the paging software doesn't see, i.e. Q:jobsvir_warn.bat
@echo off
q:
copy c:alert.pag q:alert.pag
or similar.
This will probably not work as my .bat file skills went out of the window at the same time as DOS
Cheers
Ian
I'm going to guess that the anti-virus software is smart and is thinking that when it runs this program that it is possibly doing more damage, so denies system level access to other drives while in "You have a Virus" mode. Maybe
I don't remember wht system we have in HQ but it actually locks the whole file system up until the action required is performed by the Admin.
Another option is to try and run this application from the Q drive.
I.e. put the following .bat in the a directory on the Q drive that the paging software doesn't see, i.e. Q:jobsvir_warn.bat
@echo off
q:
copy c:alert.pag q:alert.pag
or similar.
This will probably not work as my .bat file skills went out of the window at the same time as DOS
Cheers
Ian
#3
Like the thinking - just my sty-lee
Approach from a different angle
With a few mods that could work... (in theory) as rights access NT doesn't come into it - just have to worry 'bout rights access Novell
A thought that had crossed my mind was that NAI (an NT User) did not have access rights to me (GOD! ) at Root but I had (thought) given access to Everyone.
Doh! Ian will report back tomorrow - thanks.
Approach from a different angle
With a few mods that could work... (in theory) as rights access NT doesn't come into it - just have to worry 'bout rights access Novell
A thought that had crossed my mind was that NAI (an NT User) did not have access rights to me (GOD! ) at Root but I had (thought) given access to Everyone.
Doh! Ian will report back tomorrow - thanks.
#5
Puff,
Before I start I have no qualifications in NT/Novell or any OS but may have a couple of ideas to try - but they well be ant chuff
I had a prob on NT4 - i was trying to write a batch file to change paths coz im lazy.
any how a
cd windows
would work fine , however a
cd windowssystem32
would not.
running the command on 2 lines i.e.
cd windows
cd system32
worked fine.
you could try to convert the batch file to a com file - there used to be a bat2com utility (i seem to remember from the dark ages of DOS V5 (not included with DOS))
and try running that. Or maybe bang up a small prog in VB or like to do the copy. I could bang one up for you if you do not have the resources. the vb route would require the vb runtime files to be installed on that machine tho. (5mb ish)
failing that uninstall the anti virus software
[This message has been edited by jjones (edited 12 October 2000).]
Before I start I have no qualifications in NT/Novell or any OS but may have a couple of ideas to try - but they well be ant chuff
I had a prob on NT4 - i was trying to write a batch file to change paths coz im lazy.
any how a
cd windows
would work fine , however a
cd windowssystem32
would not.
running the command on 2 lines i.e.
cd windows
cd system32
worked fine.
you could try to convert the batch file to a com file - there used to be a bat2com utility (i seem to remember from the dark ages of DOS V5 (not included with DOS))
and try running that. Or maybe bang up a small prog in VB or like to do the copy. I could bang one up for you if you do not have the resources. the vb route would require the vb runtime files to be installed on that machine tho. (5mb ish)
failing that uninstall the anti virus software
[This message has been edited by jjones (edited 12 October 2000).]
#6
PTMW,
Been reading your first post a couple of times. When you say "Run a program". I think it means an exe or com file. This has already been suggested.
A batch file is just that. A batch of comands.
An exe file is a program run command and can be a program all in itself. (Hope I'm not teaching to suck eggs. Appols if I am.)
I would as suggested turn it into an exe file and see if it runs.
I certanly would not have thought it to be access rights as A) your an admin and B) you can run it manually.
And having read it again, does the AV software require a path statement as it replies with 0 files copied. Does the AV software know where to find this file it is meant to be copying and activating.
It is a little hard to work out via BBS and not seeing the problem first hand. IMO
A few suggestions which I hope work.
P.
Been reading your first post a couple of times. When you say "Run a program". I think it means an exe or com file. This has already been suggested.
A batch file is just that. A batch of comands.
An exe file is a program run command and can be a program all in itself. (Hope I'm not teaching to suck eggs. Appols if I am.)
I would as suggested turn it into an exe file and see if it runs.
I certanly would not have thought it to be access rights as A) your an admin and B) you can run it manually.
And having read it again, does the AV software require a path statement as it replies with 0 files copied. Does the AV software know where to find this file it is meant to be copying and activating.
It is a little hard to work out via BBS and not seeing the problem first hand. IMO
A few suggestions which I hope work.
P.
#7
Here's an idea....
Is NetShield or VirusScan service running under a different user account from when you test it?
Does that user have permissions to write a file to the Q drive? As it's trying to copy the file, I would guess that it has got sufficient read/execute privs on the batch file.
Can you log as the user under which the NAI services are running and try to copy the file to Q?
Cheers,
Chris.
Is NetShield or VirusScan service running under a different user account from when you test it?
Does that user have permissions to write a file to the Q drive? As it's trying to copy the file, I would guess that it has got sufficient read/execute privs on the batch file.
Can you log as the user under which the NAI services are running and try to copy the file to Q?
Cheers,
Chris.
Trending Topics
#8
More ideas - thanks.
Back to the orifice to try tomorrow
With the use a tank to crack an egg system, I allocated every user group mega access+ on both the .bat & the target - no good
No apparent AV user account...
All re-writes of the .bat work (but not under AV). File is R/W
Task tomorrow is to run scheduler (Resource Kit one) & see what occurs...
This is now a matter of PTMW! over NT/Novell rather than practical usage (added to which, Foxpro program which should do more or less the same for a Gateway crash, also fails to work...[tho' I haven't yet seen the code on it]).
Joy
Back to the orifice to try tomorrow
With the use a tank to crack an egg system, I allocated every user group mega access+ on both the .bat & the target - no good
No apparent AV user account...
All re-writes of the .bat work (but not under AV). File is R/W
Task tomorrow is to run scheduler (Resource Kit one) & see what occurs...
This is now a matter of PTMW! over NT/Novell rather than practical usage (added to which, Foxpro program which should do more or less the same for a Gateway crash, also fails to work...[tho' I haven't yet seen the code on it]).
Joy
#11
Scooby Regular
Join Date: Jul 2000
Location: cloud cuckoo land
Posts: 536
Likes: 0
Received 0 Likes
on
0 Posts
Puff
Couple of things off the top of my head.
I don't know the av s/w but I think you need to step through it a bit at a time to try and eliminate a bit at a time.
From reading the thread it's not clear whether the copy problem is reading the file or writing it.
Try changing the batch file to
type c:alert.pag
and see if it displays on screen.
If it does then the problem is your destination directory. Probably permissions but maybe there is a file in the directory already that it can't overwrite?
If it doesn't then you know you have a read problem, almost certainly permissions.
Lot's of NT apps use the SYSTEM account to run stuff... check that it has rights to the files and directories.
Couple of things off the top of my head.
I don't know the av s/w but I think you need to step through it a bit at a time to try and eliminate a bit at a time.
From reading the thread it's not clear whether the copy problem is reading the file or writing it.
Try changing the batch file to
type c:alert.pag
and see if it displays on screen.
If it does then the problem is your destination directory. Probably permissions but maybe there is a file in the directory already that it can't overwrite?
If it doesn't then you know you have a read problem, almost certainly permissions.
Lot's of NT apps use the SYSTEM account to run stuff... check that it has rights to the files and directories.
#12
I'm no LAN admin - prefer to stick to IP design. but I agree with LANCAT - it sounds as if the account which the NT app uses when it runs, does not have the appropriate Novell rights to write the file. Maybe it's just a local NT account on that one machine with no Novell equivalent.
Is the AV s/w running on an NT Server or Workstation (the C: ) ? Is the q: a Novell or NT shared drive ?
Regards
Dean
[This message has been edited by dsmith (edited 18 October 2000).]
Is the AV s/w running on an NT Server or Workstation (the C: ) ? Is the q: a Novell or NT shared drive ?
Regards
Dean
[This message has been edited by dsmith (edited 18 October 2000).]
#13
I assume the solomons or whatever stuff is running as a service, with logon as system or whatever it's called radiobutton on.
In which case try checking the interact with desktop box, this has solved problems like this in the past for me.
Good luck
Simon
In which case try checking the interact with desktop box, this has solved problems like this in the past for me.
Good luck
Simon
#14
PTMW,
From what I can gather you are copying a file to a network drive...
Try mapping the drive first in the batch file...
NAV usually runs under the system account, which unless you have set it up will have no mapped drives.
Cheers...
...CharlieP
From what I can gather you are copying a file to a network drive...
Try mapping the drive first in the batch file...
NAV usually runs under the system account, which unless you have set it up will have no mapped drives.
Cheers...
...CharlieP
#15
I've seen similar problems before. What's happening is that the AV software is running as a NT Service which by default uses the NT System user account. This user only has access to resources on the local machine, ie. the c: drive and any other partitions setup locally. If it attempts to access a network drive, then you will get an access denied error.
One solution is to change the user account that the AV software is using. This can be done by going to the NT Control Panel and selecting the Services applet. You then need to identify which service is the one that is running the bat file. Hopefully from the services names it should be possible to work out which one is the AV software. Now click on the Startup pushbutton. In the dialog box that pops up, you can specify the user account that you have used in the past to successfully copy files to the Novell machine. Alternatively click on the pushbutton with the three '...' and select the user there. You will also need to give the password & confirm the password for the user specified. Once you have specified the user that the service will use, stop and restart the service. Hopefully the service will now be able to copy files to the Novell box. If it still doesn't work, then it's probably because the batch file specifies a q: drive which isn't mapped when the batch file is run by the service. I haven't played with a Novell box, so this may not work, but I would try changing the bat file to use the name of the Novell box, for example:
copy c:alert.pag \novellboxnameshare
You could also try:
net use q: \novellboxnameshare
copy c:alert.pag q:
If you're still having problems, check the NT event system and applications logs as well as any log provided by the AV software. Hope this helps.
One solution is to change the user account that the AV software is using. This can be done by going to the NT Control Panel and selecting the Services applet. You then need to identify which service is the one that is running the bat file. Hopefully from the services names it should be possible to work out which one is the AV software. Now click on the Startup pushbutton. In the dialog box that pops up, you can specify the user account that you have used in the past to successfully copy files to the Novell machine. Alternatively click on the pushbutton with the three '...' and select the user there. You will also need to give the password & confirm the password for the user specified. Once you have specified the user that the service will use, stop and restart the service. Hopefully the service will now be able to copy files to the Novell box. If it still doesn't work, then it's probably because the batch file specifies a q: drive which isn't mapped when the batch file is run by the service. I haven't played with a Novell box, so this may not work, but I would try changing the bat file to use the name of the Novell box, for example:
copy c:alert.pag \novellboxnameshare
You could also try:
net use q: \novellboxnameshare
copy c:alert.pag q:
If you're still having problems, check the NT event system and applications logs as well as any log provided by the AV software. Hope this helps.
#16
Merlin
Spot on
.bat (or .cmd as it ended up) reads
@ echo off
copy c:alert.pag \novellservervolumedirectorysubdirectory
Now that that works, its also been re-worked to page me should various critical services fail & other such things
It hasn't gone of yet...
Thanks to Merlin & all others for their help in solving this NT conundrum
Spot on
.bat (or .cmd as it ended up) reads
@ echo off
copy c:alert.pag \novellservervolumedirectorysubdirectory
Now that that works, its also been re-worked to page me should various critical services fail & other such things
It hasn't gone of yet...
Thanks to Merlin & all others for their help in solving this NT conundrum
#17
Glad to hear this is sorted. You're not the first to be hit by the wonderful NT security model Over the last few years I've talked several major banks through the same issues.
Cheers, merlin
Cheers, merlin
Thread
Thread Starter
Forum
Replies
Last Post
Goochie
Computer & Technology Related
10
12 December 2003 03:14 PM