/build/static/layout/Breadcrumb_cap_w.png

Scripting sysocmgr command

Hi, have been checking Appdeploy regularly over the past few months, but am new to the message boards.

Im creating a script on our k1000, mainly a batch file with a number of dependencies, to help with building our new pcs. Part of that process involves removing unwanted Windows components, and the best way I can see is using Windows' sysocmgr.exe
Ive created the answer file, and have run the command which works a treat, but deploying the script via k1000 it fails, sysocmgr (Windows XP Setup) starts up but fails with error "The application could not be initialized". Heres the command im using:

start /wait sysocmgr /q /r /i:%windir%\inf\sysoc.inf /u:"\\path\answerfile.txt"

ive tried running the batch manually, and even tried running it manually using the SYSTEM account using the AT command and it does run fine. Im stuck and out of ideas as to why its doing this when run via k1000, anyone else had experience scripting sysocmgr on K1000? have any suggestions where the problem is@
any help or ideas are welcome. thanks

0 Comments   [ + ] Show comments

Answers (6)

Posted by: rjonesdj 12 years ago
Orange Senior Belt
0
in further desperation i tried creating a VBS that would run the same command, and run it as the local administrator, just to see if that would work.

Option explicit
Dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
'Replace the path with the program you wish to run c:\program files...
oShell.Run "RunAs /noprofile /user:administrator ""sysocmgr /q /r /i:%windir%\inf\sysoc.inf /u:\\path\answerfile.txt"""
WScript.Sleep 100
'Replace the string --> yourpassword~ with the
'password used on your system. Include the tilde "~"
oShell.Sendkeys "password~"
Wscript.Quit


unfortunately that still fails, doesnt give an error message, but while monitoring the task manager, it doesnt look like sysocmgr is run at all. again manually running the script works absolutely fine, can see the process run as admin account, and it does uninstall the components as required.

Wondering if its something to do with the account KACE uses to run the scripts, the location of the answerfile does grant 'Everyone' access, but KACE still seems to be failing running the command.
Posted by: anonymous_9363 12 years ago
Red Belt
0
You're approaching things in completely the wrong way. You should build a reference PC with those components removed, SysPrep that, turn that into an image and deploy that image.
Posted by: rjonesdj 12 years ago
Orange Senior Belt
0
Unfortunately the process I have to follow is the scripted method.
Using reference images is out of the question for us, I work in a large organisation which includes a number of organisations which have all merged in the past few years, lots of different hardware and software to take into account.
There is still no 'single desktop', and users across a large geographical area are still using very different setups. My manager wants to follow a scripted method, where we deploy one basic XP image, use KACE's driver cache, and then use scripts to install and configure the other bits of software required afterwards, that way its easy to go back and change things where needed and eventually the different build scripts used for the varied systems can be modified/merged into one single desktop.

I completely understand that an image could be configured with sysprep minus the components to begin with, but its not really an option here, thanks for suggestion all the same.
the sysocmgr command should work, and does every other way ive tried, except when scripting via K1000. just cant see why its failing this way.
Posted by: anonymous_9363 12 years ago
Red Belt
0
What happens if you run the script in the context of the local System account using PSExec? That test will, as closely as possible, emulate what happens when the KBox runs it.
Posted by: rjonesdj 12 years ago
Orange Senior Belt
0
its an idea, will try that next. thanks
Posted by: rjonesdj 12 years ago
Orange Senior Belt
0
just in case anyone stumbles across this, trying to accomplish the same thing
I ended up creating a post installation task on the k2000 to run the command. worked first time.

still unsure why it wasnt working on the k1000, but dont have any more time to spend working it out..
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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