I'd try something like this: $sfDesktop = $env:USERPROFILE + "\desktop"
On Tue, Sep 7, 2010 at 3:36 PM, Joseph L. Casale <[email protected]> wrote: > Hey Guys, > > What’s the most simple and elegant way to trap for the following variable > assignment: > > Eg. $sfDesktop = [Environment]::GetFolderPath("Desktop") > > > > Should I assign it like this, and test for a proper value when using (skip > otherwise while I cycle through all the ones I need to)? If so, how do you > test the value for it having been properly assigned? > > > > Sorry, ps noob here… > > Thanks! > jlc > > ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ > ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ > > --- > To manage subscriptions click here: > http://lyris.sunbelt-software.com/read/my_forums/ > or send an email to [email protected] > with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected] with the body: unsubscribe ntsysadmin
