/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (3)

Posted by: KnottyMan 14 years ago
Senior Yellow Belt
0
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
Red Belt
0
Since the script was executed by the KBOX client under the "Local System" account you would not see any command prompt.

Also %USERPROFILE% is not an environment variable when run under the local system account
Posted by: GillySpy 14 years ago
7th Degree Black Belt
0
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ