startup script wont work saying "access denied"

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
davidblmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

angel_fire2701Commented:
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
davidblmAuthor Commented:
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
davidblmAuthor Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.