Vista64 MI/batch file weirdness
I have an app that easily deploys via a batch file. Under Vista64 and XP32, if I run it manually, works great. If the MI runs on an XP32 box, works great.
Under Vista64, the commands in the batch file run, just not all of them and I don't get the command prompt box that shows the install is running, just the processes in Task Manager. The package is downloaded from the kbox, unzipped, it executes and then deletes the download, as expected.
What's really weird is I don't get the command prompt box so I can't troubleshoot since I get no output. I think the agent is ok as I got all my other MI's that the box needed.
Why would I not get the command prompt?
Batch file -
@echo off
echo Installing/Updating EST-Duct EST-Mech...
if /i "%programfiles(x86)%"=="c:\program files (x86)" (GOTO 64) ELSE (GOTO 32)
echo Something doesn't fit, contact IT...
pause
GOTO END
:32
rsync -a --delete EST /cygdrive/c/map-software
copy /y pdfparser32.dll c:\map-software\est\pdfparser.dll > nul
copy /y "est-duct est-mech.lnk" "%USERPROFILE%\..\All users\desktop" > nul
GOTO DETAILS
:64
rsync -a --delete EST /cygdrive/c/map-software
copy /y pdfparser32.dll c:\map-software\est\pdfparser.dll > nul
copy /y "est-duct est-mech.lnk" "%USERPROFILE%\..\public\desktop" > nul
GOTO DETAILS
:DETAILS
cacls c:\map-software /t /e /p users:c > nul
copy /y nethasp.ini %WINDIR% > nul
GOTO END
:END
Under Vista64, the commands in the batch file run, just not all of them and I don't get the command prompt box that shows the install is running, just the processes in Task Manager. The package is downloaded from the kbox, unzipped, it executes and then deletes the download, as expected.
What's really weird is I don't get the command prompt box so I can't troubleshoot since I get no output. I think the agent is ok as I got all my other MI's that the box needed.
Why would I not get the command prompt?
Batch file -
@echo off
echo Installing/Updating EST-Duct EST-Mech...
if /i "%programfiles(x86)%"=="c:\program files (x86)" (GOTO 64) ELSE (GOTO 32)
echo Something doesn't fit, contact IT...
pause
GOTO END
:32
rsync -a --delete EST /cygdrive/c/map-software
copy /y pdfparser32.dll c:\map-software\est\pdfparser.dll > nul
copy /y "est-duct est-mech.lnk" "%USERPROFILE%\..\All users\desktop" > nul
GOTO DETAILS
:64
rsync -a --delete EST /cygdrive/c/map-software
copy /y pdfparser32.dll c:\map-software\est\pdfparser.dll > nul
copy /y "est-duct est-mech.lnk" "%USERPROFILE%\..\public\desktop" > nul
GOTO DETAILS
:DETAILS
cacls c:\map-software /t /e /p users:c > nul
copy /y nethasp.ini %WINDIR% > nul
GOTO END
:END
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
KnottyMan
14 years ago
The script was not executing "copy /y "est-duct est-mech.lnk" "%USERPROFILE%\..\public\desktop" > nul " so I guess under V64 the kbot runs as SYSTEM and not Administrator so therefore %USERPROFILE% was null. I hard coded it to c:\users\... but it still bugs me that I don't get the command prompt. I guess I can make silent installers now if it keeps that behavior.
Posted by:
KevinG
14 years ago
Posted by:
GillySpy
14 years ago
The agent service is running under local system on 32-bit and 64-bit OSes. For your testing you can use this technique:
http://www.kace.com/support/customer/faq/index.php?action=artikel&cat=5&id=731&artlang=en
If you want to run scripts as a specific user then you can use the new features of version 5.1 scripting
http://www.kace.com/support/customer/faq/index.php?action=artikel&cat=5&id=731&artlang=en
If you want to run scripts as a specific user then you can use the new features of version 5.1 scripting
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.