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
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)
Please log in to answer
Posted by:
rjonesdj
12 years ago
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.
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
Posted by:
rjonesdj
12 years ago
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.
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
Posted by:
rjonesdj
12 years ago
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.