Modifying entry point & icon
|Top Previous Next|
In the following example, the auto-launch executable (entry-point executable) of a virtual package is defined as %Program Files%\\MyApp\\Run.exe.
Additionally, the virtual package's icon is copied from calc.exe.
Note that it is important to call PackageSave before closing the package, to save changes.
if (PackageOpen(L"C:\\MyPackage.exe", 0, &hPkg) == APIRET_SUCCESS)
// Modify package property "AutoLaunch"
PackageSetProperty(hPkg, L"AutoLaunch", L"%Program Files%\\MyApp\\Run.exe");
// Set package's icon to be the same as Calc's
// Save and close package