Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
daniel_99_1999 Absent Member.
Absent Member.
1311 views

Environment Variables

Does anyone know if it's possible to use environment variables in the image path when using WinPE imaging?

I've tried with no success, just wondering if there's anything I'm missing.
Labels (2)
0 Likes
8 Replies
AutomaticReply Absent Member.
Absent Member.

Re: Environment Variables

daniel,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

These forums are peer-to-peer, best effort, volunteer run and that if your issue
is urgent or not getting a response, you might try one of the following options:

- Visit https://www.microfocus.com/support-and-services and search the knowledgebase and/or check
all the other self support options and support programs available.
- Open a service request: https://www.microfocus.com/support
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.microfocus.com)
- You might consider hiring a local partner to assist you.
https://www.partnernetprogram.com/partnerfinder/find.html

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.microfocus.com/faq.php

Sometimes this automatic posting will alert someone that can respond.

If this is a reply to a duplicate posting or otherwise posted in error, please
ignore and accept our apologies and rest assured we will issue a stern reprimand
to our posting bot.

Good luck!

Your Micro Focus Forums Team
http://forums.microfocus.com



0 Likes
Knowledge Partner
Knowledge Partner

Re: Environment Variables

Daniel 99 1999,
> Does anyone know if it's possible to use environment variables in the
> image path when using WinPE imaging?


Let me ask those who know better than I do 🙂

--
Anders Gustafsson (NKP)
The Aaland Islands (N60 E20)

Have an idea for a product enhancement? Please visit:
https://www.novell.com/products/enhancement-request.html

0 Likes
Knowledge Partner
Knowledge Partner

Re: Environment Variables

Here is the reply:

All we do is send down Microsoft's PXE client.
We are out of the picture after that.

Perhaps if you explained a little bit what you are trying to do? I
myself do not use WinPE

--
Anders Gustafsson (NKP)
The Aaland Islands (N60 E20)

Have an idea for a product enhancement? Please visit:
https://www.novell.com/products/enhancement-request.html

0 Likes
Highlighted
daniel_99_1999 Absent Member.
Absent Member.

Re: Environment Variables

AndersG;2438183 wrote:
Here is the reply:

All we do is send down Microsoft's PXE client.
We are out of the picture after that.

Perhaps if you explained a little bit what you are trying to do? I
myself do not use WinPE

--
Anders Gustafsson (NKP)
The Aaland Islands (N60 E20)

Have an idea for a product enhancement? Please visit:
https://www.novell.com/products/enhancement-request.html


Hi,

Thanks for your reply.

What I'm trying to achieve, is deploy the correct image based on whether the machine uses a BIOS or UEFI bootloader.

I can't assign it based on a dynamic group within ZCM itself, as there is no option for using bootloader type in the dynamic group selection type.

So, I have turned to the imaging environment itself. I can fairly easily pull from the WinPE registry to check which bootloader the machine is running, and store that in an environment variable.

For example, lets assume I add a few lines to the startnet.cmd to achieve this, and store a value of "bios" or "uefi" in an environment variable called %bootloader%

I would then want to use that environment variable in the Novell Imaging program, but it doesn't seem to honour them (See here for example: http://imgur.com/a/24npB )

When I try something like that, using a known working environment variable, I just get invalid path errors.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Environment Variables

OK. Unfortunately, there is no easy way. When you use 3rd party
imaging. ZCM is completely out of the picture. I am not familiar with
WinPE, but what you would need to do is to script something that
contacts a webservice that provides you with the info. Not a trivial
task.

--
Anders Gustafsson (NKP)
The Aaland Islands (N60 E20)

Have an idea for a product enhancement? Please visit:
https://www.novell.com/products/enhancement-request.html

0 Likes
daniel_99_1999 Absent Member.
Absent Member.

Re: Environment Variables

AndersG;2438636 wrote:
OK. Unfortunately, there is no easy way. When you use 3rd party
imaging. ZCM is completely out of the picture. I am not familiar with
WinPE, but what you would need to do is to script something that
contacts a webservice that provides you with the info. Not a trivial
task.

--
Anders Gustafsson (NKP)
The Aaland Islands (N60 E20)

Have an idea for a product enhancement? Please visit:
https://www.novell.com/products/enhancement-request.html


Hi,

I am not sure what you mean by this. ZCM is very much in the picture, it is the ZCM "zenworktodo" program that I am having trouble with, not the WinPE environment itself.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Environment Variables

You likely want to use the 3rd Party Scripting option and use IMAGEx.exe in your script to call the desired image based on your queries.
--
Please give a hearty thumbs up to any post you find helpful!
To find articles by Craig Wilson simply follow the link: Craig Wilson's Tips!
0 Likes
daniel_99_1999 Absent Member.
Absent Member.

Re: Environment Variables

CRAIGDWILSON;2438640 wrote:
You likely want to use the 3rd Party Scripting option and use IMAGEx.exe in your script to call the desired image based on your queries.


OK, I'm sensing that the answer to my original question is a resounding "no" to environment variables.

I'm reluctant to script wiping the disk with diskpart, creating the right partition sizes and applying the image with imagex etc, because quite frankly, that's what zenworks is meant to be there for, to save me doing all that. I may as well deploy my own custom imaging environment by that point.

I'll put in a feature request to have the zenworkstodo honour environment variables and see if it gets picked up at all.

Out of curiosity (as I've not used it in anger), how does the zenworks standard imaging handle UEFI vs BIOS? Can you have just one image that can apply to both? If not, how would a similar task (applying the correct image based on bootloader) be achieved?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.