[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

startup script wont work saying "access denied"

Posted on 2010-03-25
4
Medium Priority
?
875 Views
Last Modified: 2012-05-09
Hi, trying to run this script as a startup script using GP:
@ECHO OFF
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
:_End

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
Peter
0
Comment
Question by:davidblm
  • 2
3 Comments
 
LVL 3

Expert Comment

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

Author Comment

by:davidblm
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
0
 

Accepted Solution

by:
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::

@ECHO OFF
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
:_End
0

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