|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Running Bat file from ASP on Windows Server x64 problem.I'm having trouble running a bat file from an ASP page. It works fine on Windows 2003 Std x32 server but fails now we have upgraded to the x64 edition In the ASP we are trying to run the following Set oWSH= Server.CreateObject("WScript.Shell") errmsg = oWSH.Run("d:\\scripts\\copyiissettings.bat 10.0.0.156",0,True) set oWSH = nothing The errmsg is returning 1 (not very helpful) In the BAT file we are running the following command: cscript.exe c:\windows\system32\iiscnfg.vbs /copy /ts %1 /tu machineusername /tp machinepassword I am sure the permissions are setup correctly in IIS as both the Application Pool and Authenticated Anonymous User are set as the Administrator. We are also running IIS with he following flag enabled Enable32BitAppOnWin64=True I can only think maybe there is a problem being related to the fact we are running x64 and perhaps there is a registry setting or group policy setting i need to change? Thanks, Greg. try running a simple bat file like
c: cd\ see if that errors. Show quoteHide quote "GP" <supp***@powerfront.com> wrote in message news:uL4x4KB7GHA.4352@TK2MSFTNGP05.phx.gbl... > Hi, > > I'm having trouble running a bat file from an ASP page. > It works fine on Windows 2003 Std x32 server but fails now we have > upgraded to the x64 edition > > In the ASP we are trying to run the following > > Set oWSH= Server.CreateObject("WScript.Shell") > > errmsg = oWSH.Run("d:\\scripts\\copyiissettings.bat > 10.0.0.156",0,True) > > set oWSH = nothing > > The errmsg is returning 1 (not very helpful) > > In the BAT file we are running the following command: > cscript.exe c:\windows\system32\iiscnfg.vbs /copy /ts %1 /tu > machineusername /tp machinepassword > > I am sure the permissions are setup correctly in IIS as both the > Application Pool and Authenticated Anonymous User are set as the > Administrator. We are also running IIS with he following flag enabled > Enable32BitAppOnWin64=True > I can only think maybe there is a problem being related to the fact we are > running x64 and perhaps there is a registry setting or group policy > setting i need to change? > > Thanks, > Greg. > > > > > > i figured it out.
problem is that when you call the bat from the ASP it runs as a 32 bit process and runs the cscript.exe from the syswow64 directory and this fails. i copied the cscript.exe from the system32 into the syswow64 directory and this fixed the problem g. Show quoteHide quote "Slim" <m*@here.com> wrote in message news:uYKhrsG7GHA.4604@TK2MSFTNGP03.phx.gbl... > try running a simple bat file like > > c: > cd\ > > see if that errors. > > > > > "GP" <supp***@powerfront.com> wrote in message > news:uL4x4KB7GHA.4352@TK2MSFTNGP05.phx.gbl... >> Hi, >> >> I'm having trouble running a bat file from an ASP page. >> It works fine on Windows 2003 Std x32 server but fails now we have >> upgraded to the x64 edition >> >> In the ASP we are trying to run the following >> >> Set oWSH= Server.CreateObject("WScript.Shell") >> >> errmsg = oWSH.Run("d:\\scripts\\copyiissettings.bat >> 10.0.0.156",0,True) >> >> set oWSH = nothing >> >> The errmsg is returning 1 (not very helpful) >> >> In the BAT file we are running the following command: >> cscript.exe c:\windows\system32\iiscnfg.vbs /copy /ts %1 /tu >> machineusername /tp machinepassword >> >> I am sure the permissions are setup correctly in IIS as both the >> Application Pool and Authenticated Anonymous User are set as the >> Administrator. We are also running IIS with he following flag enabled >> Enable32BitAppOnWin64=True >> I can only think maybe there is a problem being related to the fact we >> are running x64 and perhaps there is a registry setting or group policy >> setting i need to change? >> >> Thanks, >> Greg. >> >> >> >> >> >> > > I would of thought that bat files run without cscript
Show quoteHide quote "GP" <supp***@powerfront.com> wrote in message news:%230r9CXN7GHA.1560@TK2MSFTNGP04.phx.gbl... >i figured it out. > > problem is that when you call the bat from the ASP it runs as a 32 bit > process and runs the cscript.exe from the syswow64 directory and this > fails. > i copied the cscript.exe from the system32 into the syswow64 directory and > this fixed the problem > > g. > > "Slim" <m*@here.com> wrote in message > news:uYKhrsG7GHA.4604@TK2MSFTNGP03.phx.gbl... >> try running a simple bat file like >> >> c: >> cd\ >> >> see if that errors. >> >> >> >> >> "GP" <supp***@powerfront.com> wrote in message >> news:uL4x4KB7GHA.4352@TK2MSFTNGP05.phx.gbl... >>> Hi, >>> >>> I'm having trouble running a bat file from an ASP page. >>> It works fine on Windows 2003 Std x32 server but fails now we have >>> upgraded to the x64 edition >>> >>> In the ASP we are trying to run the following >>> >>> Set oWSH= Server.CreateObject("WScript.Shell") >>> >>> errmsg = oWSH.Run("d:\\scripts\\copyiissettings.bat >>> 10.0.0.156",0,True) >>> >>> set oWSH = nothing >>> >>> The errmsg is returning 1 (not very helpful) >>> >>> In the BAT file we are running the following command: >>> cscript.exe c:\windows\system32\iiscnfg.vbs /copy /ts %1 /tu >>> machineusername /tp machinepassword >>> >>> I am sure the permissions are setup correctly in IIS as both the >>> Application Pool and Authenticated Anonymous User are set as the >>> Administrator. We are also running IIS with he following flag enabled >>> Enable32BitAppOnWin64=True >>> I can only think maybe there is a problem being related to the fact we >>> are running x64 and perhaps there is a registry setting or group policy >>> setting i need to change? >>> >>> Thanks, >>> Greg. >>> >>> >>> >>> >>> >>> >> >> > >
Other interesting topics
retreiving data from html page
Quizz script performance bug -- too many questions? interesting problem... call store procedure for inserting data in asp Problem with asp page returning a jpg image... SMTP how can i detect multiplt VBNewLine's in a row Assign Javascript value to asp session variable Session variable randomly mixed or lost? need to convert google search ref to find what the user search |
|||||||||||||||||||||||