batch file does not run with admin rights

Windows will not run a .bat file.

I have a batch file and an exe file that I'm trying to run from a network location.
Everyone has full access to this network location.  When I double click the batch file and run it as the logged in user,
the file works fine.  When I right click, and select run as administrator, it fails, it does not run.  It's like reversed, I'm trying to use a GP policy to install this file on
all PCs, but it's not working and I think this is why it's not working.

sophos
afactsNetwork EngineerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
NVITCommented:
This seems to be an install that requires admin rights, so the gpo should be under Computer Configuration (not User Configuration) > Policies > Windows Settings > Scripts > Startup.

BTW, there seems to be a mis-spelling, i.e. s:\FileTra nsfer
0
 
MacleanSystem EngineerCommented:
That script is intended for the regular endpoint deployment, I am not certain whether the InterceptX deploys through the same methods if downloaded as a standalone package (I could be wrong, I just recall having some issues trying to deploy it separate from the existing AV, but forgot what the issue was unfortuntely).
What I do is I log into the cloud console, and download the complete package.

Capture.PNG
Once I have that I run a script to uninstall the existing Sophos installation (Set as Run Once) after which I run the script part which you also run utilizing the SophosSetup.exe which contains both AV & InterceptX

Not sure if that helps or is applicable to your environment, but it does the job for me.
Once everyone has the full package deployed you can create a new GPO to check if installed, and if no, deploy full package.
This is however a GPO under computer as mentioned by the expert above my post his comments.
0
 
McKnifeCommented:
The blank that NVIT noted is the 1st problem. The 2nd is the drive s: - it has to be present for any user, and network drives are per-user! So it's better to use \\server\share\... (the UNC notation).
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
afactsNetwork EngineerAuthor Commented:
I'll check when I get in tomorrow
0
 
afactsNetwork EngineerAuthor Commented:
I corrected the spelling in the path, removed the extra space.  I also changed the path to the unc, \\server\path, and
I double checked and the script is under the computer config -> policies -> windows settings -> scripts and it's still not working.

I did a gpupdate/force on a the client, and restarted it a few times, I confirmed the computer is in the correct OU as well where the policy would be applied, actually it gets applied to all of the computers.  

I did an RSOP, and it looks like there are two references tot eh same batch file, not sure why, or how to clean that up?
I also included a pic of my GP.
GP
rsop
0
 
afactsNetwork EngineerAuthor Commented:
I ran a gpresult and the report has no data for "computer details", which it should, since this script is under the computer section, not user.
0
 
afactsNetwork EngineerAuthor Commented:
I also checked the event log and I couldn't find anything point to a failed GP.
0
 
McKnifeCommented:
1 in rsop, check the full GPO names - they are cut off in the screenshot. Maybe some similar GPO in effect as well?
2 "the report has no data for "computer details", which it should" - you need to start gpresult from an elevated command line.
3 Please simulate the run as follows:
A) download psexec (part of pstools)
B) on an elevated command line, run: psexec -s -i cmd
C) on the new command line which appears, run \\fs1\...\...\...yourscript.bat and see what errors show and quote those.
0
 
afactsNetwork EngineerAuthor Commented:
I did check the names, they are correct.
I did forget to run it as elevated, I just did and ther are entries under computer section.

here's a snipit from the report:
interceptx
here's the output from the 2nd cmd prompt:
psexec
0
 
McKnifeCommented:
If the path cannot be found, then most probably, the system account has no access permissions. Set permissions on the share so the the group authenticated users has read permissions. Do the same at NTFS level.
0
All Courses

From novice to tech pro — start learning today.