views:

464

answers:

3

I try to create iPhone configuration file via c# script as proposed in "Enterprise deployment Guide" of Apple and faced the following problem :

iPCU.exe TestScript.cs // This command should create the profile but he not . He just run iPhone configuration //utility. TestScrip.cs consist example from Apple's pdf. Maybe somebody know the way that really work ?

+1  A: 

Apple's provided sample script fails to compile; the ipcu.log, whose location is specified in nlog.config, has:

Error: The name 'Console' does not exist in the current context

Comment out the "Console.WriteLine" or add "using System;" to your script & you will get something like:

[2010-02-23 15:13:32.4466 iPCU] Debug: CoreFoundation.dll - Version 8.4.441.10 [2010-02-23 15:13:32.4466 iPCU] Debug: MobileDevice.dll - Version 8.4.238.9 [2010-02-23 15:13:32.5946 iPCU] Debug: Saving :ee14db03-f5c0-4916-bbfa-56f9bd47775f [2010-02-23 15:13:32.6106 iPCU] Warn: I don't know what to do with an account of type:
[2010-02-23 15:13:32.6106 iPCU] Warn: I don't know what to do with an account of type:
[2010-02-23 15:13:32.8966 iPCU] Debug: SaveSettings [2010-02-23 15:13:32.8966 iPCU] Debug: SaveSettings [2010-02-23 15:13:32.8966 iPCU] Debug: SaveSettings [2010-02-23 15:13:32.8966 iPCU] Debug: SaveSettings [2010-02-23 15:13:35.9679 iPCU] Debug: Saving :UI_Identifier295f8e03-05fb-4725-a3bb-52ff20814e3f [2010-02-23 15:13:39.5093 iPCU] Debug: Saving :com.example.configviascript41b84468-48bd-44fd-b171-757c99ec07b8 [2010-02-23 15:13:39.5283 iPCU] Debug: Saving :com.example.configviascript8bc2800b-e14f-4d1e-8e4e-d959d89992d0 [2010-02-23 15:13:39.5283 iPCU] Debug: Saving :com.example.configviascriptaf655be3-8761-4d96-a582-60e26b257d75 [2010-02-23 15:13:39.5283 iPCU] Debug: Saving :com.example.configviascriptee14db03-f5c0-4916-bbfa-56f9bd47775f

Despite the warnings, it will compile the script and load it into iPCU windows application.

b_entity
Thank you !!!! To continue i have other question . If it's possible to create Configuration Script without iPCU window will be shown?
Pirks
There is no documentation about this, and testing shows iPCU will always pop-up.To avoid its visibility spawn it programmatically using the Process class, and set: ProcessStartInfo.WindowStyle = ProcessWindowStyle.HiddenYou then have to kill/close it in your code.
b_entity
A: 

i don't feel it is right even tho the ipcu did open and loaded everything. but, there is no file being written as the output, which makes the word "automated" more like a joke. correct me if i am wrong tho

CJ
A: 

'Configuration Profile' has an Export function which does (can be made to do) the job for plain/signed mobileconfig files.

b_entity