Friday, January 09, 2009
Deployment Forum HomeDeployment Forum ArticlesDeployment Forum Download LibraryDeployment Forum Member BlogsDeployment Forum Community Forums
Member Login
StandardLiveID


Register
Forgot Password ?



Guests can view and read messages in the community forums, but you must register and log in to Deployment Forum before you can post messages. Click Register at the top of this page. Before posting messages, please read the forum guidelines at the bottom of this page.

Subject: Userexit add a ROLE depending on the machine is a Laptop or Desktop
Prev Next
You are not authorized to post a reply.

AuthorMessages
minnesbergUser is Offline

Posts:6

Send Message
06/12/2008 3:28 AM  

Hi.

I have been trying to create a Userexist script that would check if the machine is for instance a Laptop.If the machines is a Laptop then it should be boundled with a certain Role.The purpose is when you roll a machine some laptop specifc packages (ex VPN client) should be added to the build automaticly.

Problem seem to that the Role can be Role1 on some builds and Role2, 3 or 4 on some build depending on how many Roles the machine have attached to it.

So would be cool if the script uses som sort on "NextRole" variable. 

Script checks if the Machine is a Laptop if YES then add "Laptop_Role" to the next role ex Role3.

Thanks!

KonradUser is Offline

Posts:67

Send Message
06/12/2008 6:26 PM  
Have you considered doing a test for hardware type within your CustomSettings.ini, something like is described here:
http://blogs.technet.com/benhunter/archive/2007/05/20/bdd-2007-tips-and-tricks-identifying-hardware-types.aspx
and then defining your role and/or the apps to install within the [Laptop-True] section.

Alternatively, if you wanted to do it in an exitscript, you could have some code something like this to find out how many other roles have been defined so far (no idea if this would actually work ;):

Set oEnvironment = CreateObject("Microsoft.SMS.TSEnvironment")
Set dicRoles = oEnvironment.ListItem("Role")
iNextAvailableRoleNumber = dicRoles.Count + 1

To add an additional role, I think you could just then do this:

dicRoles.Add "Laptop_Role", ""
oEnvironment.ListItem("Role") = dicRoles
minnesbergUser is Offline

Posts:6

Send Message
06/17/2008 2:49 AM  

Thanks for your reply.

I got my head around it now :)

You are not authorized to post a reply.
Forums > Deployment Solutions > Zero Touch > Userexit add a ROLE depending on the machine is a Laptop or Desktop



ActiveForums 3.7
Forum Policies
Minimize

These forums are a user-supported community for IT professionals to exchange deployment tips, solutions, and techniques. For the benefit of all Deployment Forum members, please observe the following guidelines when posting to these forums:

  • We reserve the right to remove any message. Our moderators will remove all messages that are not respectful or productive. Profanity, racism, prejudice, and flaming are not tolerated.
  • Do not advertise products or services. Our moderators will remove all advertisements or service announcements. Product and service recommendations from active Deployment Forum members are encouraged, however.
  • Make sure your question isn't already answered. Before posting questions, search the forums. After ensuring that your questions are unique, post them to the most appropriate forum. This will help reduce noise in the forums.
  • Help make the most of each thread. Do not post unrelated messages to a thread. Also, if you've resolved a question outside of these forums, please share the solution with other members by posting it back to the thread.
  • Do not share confidential information. Confidential information includes product keys and addresses. Our moderators will edit any message containing confidential information, so double-check messages and their attachments before posting them.
  • Post messages using only the English language. For the benefit of all Deployment Forum members, please post your messages using the English language.

We hope that you enjoy using this community. Please submit your comments and feedback on the Comments and Feedback page or post them to the Comments, Feedback forum.



Privacy Statement  |  Terms Of Use
© 2007 Jerry Honeycutt