Need a variable to access the ALLUSERSPROFILE
I have a second script that needs to verify the extraction of a zip file of another script. However the verify fails using $(KACE_DEPENDENCY_DIR) because it references the current script path.
So I need to have this script find a directory that exists in the path of another script... but for XP and Win7. If it were just one arch, no problem, just put the explicit path.
Any 'pointers' would be appreciated! (pun intended)
Answers (3)
Looks like $(KACE_DATA_DIR) is the ticket!
Thanks for the lead SDNBTP!
%AllUsersProfile%
Comments:
-
As in "Verify that the directory “%AllUsersProfile%\Dell\KACE\kbots_cache\packages\kbots\735\WorkflowManager†exists."? - worzie 11 years ago
-
minus the screwed up quotations that got garbled - worzie 11 years ago
-
Directory does not exist: %AllUsersProfile%\Dell\KACE\kbots_cache\packages\kbots\735\WorkflowManager
but it does - worzie 11 years ago
Are you doing this directory verify from the Kace scripting page? If so, Kace doesn't know what %AllUsersProfile% variable is. Try this instead: $(KACE_INSTALL)\kbots_cache\packages\kbots\735\WorkflowManager
If you do want to use %AllUsersProfile%, use a batch script. IF EXIST %AllUsersProfile%\Dell\KACE\kbots_cache\packages\kbots\735\WorkflowManager yourcommands or IF NOT EXIST.
Comments:
-
Wish that was it. That equals: C:\Program Files\Dell\KACE\\kbots_cache\packages\kbots\735\WorkflowManager - worzie 11 years ago
-
I know it says it too:
Installation directory for executables, scripts, packages, etc.
All are synonymous. Preferred: $(KACE_INSTALL)
5.2+ Win7/Vista C:\ProgramData\Dell\KACE
5.2+ XP C:\Documents and Settings\All Users\Dell\KACE
5.2+ Mac OS X /Library/Application Support/Dell/KACE/bin
5.2+ Linux /opt/dell/kace
5.1 Windows c:\Program Files\KACE\KBOX
However it looked in Program Files :-/ - worzie 11 years ago -
What version is your kbox? For Windows these two variables are supposidly the same.
$(KACE_INSTALL)
5.2+ Win7/Vista C:\ProgramData\Dell\KACE
5.2+ XP C:\Documents and Settings\All Users\Dell\KACE
5.1 Windows c:\Program Files\KACE\KBOX
$(KACE_DATA_DIR)
5.2+ Win7/Vista C:\ProgramData\Dell\KACE
5.2+ XP C:\Documents and Settings\All Users\Dell\KACE
5.1 $(KACE_INSTALL) - SDNBTP 11 years ago