Rad,
Did some tweaks with your code (XP)..
Code:
break on
const(_OS ,split(@ProductType)[1])
const(_CSD ,val(right(@csd,1)))
const(_ADMIN ,ingroup('@wksta\'+sidtoname('S-1-5-32-544'))-1+@INWIN)
const(_HKLMSCCS ,"HKLM\SYSTEM\CurrentControlSet")
const(_HKCUSMWCV ,"HKCU\Software\Microsoft\Windows\CurrentVersion")
const(_HKLMSMWCV ,"HKLM\Software\Microsoft\Windows\CurrentVersion")
const(_Desktop ,"readvalue(_HKCUSMWCV+'\Explorer\Shell Folders','Desktop')")
const(_StartMenu ,"readvalue(_HKCUSMWCV+'\Explorer\Shell Folders','Start Menu')")
const(_Favorites ,"readvalue(_HKCUSMWCV+'\Explorer\Shell Folders','Favorites')")
const(_MyDocuments ,"readvalue(_HKCUSMWCV+'\Explorer\Shell Folders','Personal')")
const(_alldesktop ,"expandenvironmentvars(readvalue(_HKLMSMWCV+'\Explorer\User Shell Folders','Common Desktop'))")
const(_allstartmenu,"expandenvironmentvars(readvalue(_HKLMSMWCV+'\Explorer\User Shell Folders','Common Start Menu'))")
const(_LDAP ,'"LDAP://"+@domain+"/"+GetObject("LDAP://rootDSE").Get("defaultNamingContext")')
? "OS: " _OS
? "SP: " _CSD
? "Admin: " _ADMIN
? "Current Control Set: " _HKLMSCCS
? "Current Version: " _HKCUSMWCV
? "Desktop: " _Desktop
? "Start Menu: " _StartMenu
? "Favorites: " _Favorites
? "My Documents: " _MyDocuments
? "All StartMenu: " _allstartmenu
? "All Desktop: " _alldesktop
? "LDAP: " _LDAP
get $
Function Const($Constant,$Value)
Exit Execute('Function ' + $Constant + ' $' + $Constant + '=' + $Value + ' EndFunction')
EndFunction
Thanks,
Kent