[Webinar] Streamline your web hosting managementRegister Today


startup script wont work saying "access denied"

Posted on 2010-03-25
Medium Priority
Last Modified: 2012-05-09
Hi, trying to run this script as a startup script using GP:
REM --- Check for an existing installation of Sophos AutoUpdate
if exist "C:\Program Files\Sophos\AutoUpdate\ALsvc.exe" goto _End
if exist "C:\Program Files (x86)\Sophos\AutoUpdate\ALsvc.exe" goto _End
REM --- Deploy to Windows 2000/XP/2003
\\servername\SOPHOS-CID\CIDs\S021\SAVSCFXP\Setup.exe -updp "\\servername\SOPHOS-CID\CIDs\S021\SAVSCFXP" -user "domain\Sophos_Install" -pwd "password" -mng yes
REM --- End of the script

After reading a similiar article in Experts Exchnage (http://www.experts (exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/Q_24090419.html), I have tested and concluded that access to that network share is denied. The computer which is having the problem is part of domain1 but the network share is located on a server which is part of a different domain/forest (domain2) (am currently doing an domain migration using ADMT and a trust exists between the two domains etc).

I have added the "domain computers" group from domain1 on the netowrk share (as per above article) which is in domain2 but I am still getting access denied??!! What am I missing here? If anyone could shed some light on this... Many thanks
Question by:davidblm
  • 2

Expert Comment

ID: 28551118
after the if exists you could map a drive to the server
net use x: \\servername\SOPHOS-CID\CIDs\S021\SAVSCFXP  password:***** /user:theusername@thedomainname
x:\Setup.exe -updp
net use x: /delete

Author Comment

ID: 28580121
Have tried this but I get
"System error 1326 has occurred. Logon failure:unknown user name or bad password"
But I have checked passwords are correct. Is th format of this command incorrect in anyway??
 I then tried "net use x: \\servername\SOPHOS-CID\CIDs\S021\SAVSCFXP" only which then prompted me for a username and password which i typed in and this mapped the drive for me. strange

Accepted Solution

davidblm earned 0 total points
ID: 30021959
Hi, have figured out why it wasnt working. the format was incorrect. Should have been:

net use x: \\servername\SOPHOS-CID\CIDs\S021\SAVSCFXP /user:theusername@thedomainname .

therefore, the final script should look like this for anyone else with this issue::

REM --- Check for an existing installation of Sophos AutoUpdate
if exist "C:\Program Files\Sophos\AutoUpdate\ALsvc.exe" goto _End
if exist "C:\Program Files (x86)\Sophos\AutoUpdate\ALsvc.exe" goto _End
REM --- Deploy to Windows 2000/XP/2003
Net use x: \\Servername\SOPHOS-CID\CIDs\S021\SAVSCFXP /user:username@domainname
X:\Setup.exe -updp "\\Servername\SOPHOS-CID\CIDs\S021\SAVSCFXP" -user "domainname\Sophos_Install" -pwd "\ -crt R
net use x: /delete
REM --- End of the script

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

640 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