Jump to content

Recommended Posts

Posted

Hi,

Is it possible to add a command in to the _setup.xml which will remove the CAB file off of the device after it has been run? If so can someone please send me the syntax...

Thanks,

Jenya

Guest gpcarreon (MVP)
Posted

Hello

I don't know if this is the exact answer you are after. Consider this example:

<characteristic type="FileOperation">

<characteristic type="\Path\to\Target File.ext" translation="install">

<characteristic type="Delete">

<parm name="ForceDelete"/>

Posted
Hello

I don't know if this is the exact answer you are after. Consider this example:

<characteristic type="FileOperation">

<characteristic type="\Path\to\Target File.ext" translation="install">

<characteristic type="Delete">

<parm name="ForceDelete"/>

Thanks gpcarreon! I actually use your website as a resource for when I attempt to write any cabs.

So would I need to predict where the cab file would be copied to before it is installed? I guess the safe bet would be to put:

Guest gpcarreon (MVP)
Posted

Hi Jenya,

You are most welcome. Am glad that (somehow) I'm able to share info here and thru the blog. Thanks for dropping by. As for your query, kindly check this sample _setup.xml code:

<wap-provisioningdoc>

	<characteristic type="Install">

		<parm name="InstallPhase" value="install" />

		<parm name="AppName" value="GPC Uninstall File" />

		<parm name="NumDirs" value="1" />

		<parm name="NumFiles" value="1" />

		<parm name="NumRegKeys" value="0" />

		<parm name="NumRegVals" value="0" />

		<parm name="NumShortcuts" value="0" />

	</characteristic>

	<characteristic type="FileOperation">

	<characteristic type="\Temp" translation="install">

		<characteristic type="MakeDir" />

			<characteristic type="Sample.txt" translation="install">

				<characteristic type="Extract">

					<parm name="Source" value="00SAMPLE.001" />

				</characteristic>

			</characteristic>

		</characteristic>

	</characteristic>

	<characteristic type="Registry" />

	<characteristic type="FileOperation">

		<characteristic type="\Storage\windows\AppMgr\Install\TargetCab.cab" translation="install">

			<characteristic type="Delete">

				<parm name="ForceDelete" />

			</characteristic>

		</characteristic>

	</characteristic>

</wap-provisioningdoc>

If you were to re-build the XML to come up with a Smartphone-installable CAB file, the output CAB will:

1) Install 'Sample.txt' to \Temp

2) After installing the sample file, postXML instructions will delete 'TargetCab.cab' located at '\Storage\windows\AppMgr\Install\'

I tried it on my C500 with favorable results. Maybe you can just specify the location of your target CAB. I have attached the output CAB so you can extract the contents on your machine then examine the files.

Test.cab

To check if it really works, place a sample 'TargetCab.cab' to '\Storage\windows\AppMgr\Install' then run the attached 'Test.cab'. After a successful installation, there should be 'Sample.txt' at \Temp and no more 'TargetCab.cab' file at \Storage\windows\AppMgr\Install.

Posted

I added the four lines you posted initially in to my _setup.xml and it worked. I just specified the location and name of my cab file. Of course if the file is stored in a different location and or has a different name then im sure it would not work...

Thanks,

Jenya

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.