I have been looking on the MSDN website for a wscript code frag to extract the WshShell Shortcut target path from an existing shortcut.
does anyone know how to do this? MSDN is a dead end.
thanks!
John Lopez
Enterprise PDM Architect
Bong - thanks.
However, the idea is that b=2, and therefore the represented constructive name of the variable a2 is contructed from the char 'a' + the variable expansion of 'b' which equals 2. therefore a$b = variable name a2, and then, and expansion of a2 would yield the intermediate namespace...
Ulis -thanks again. Please note the following:
% set a2 "ns"
ns
% set b "2"
2
% set varname ::ns1::$a$b::var
can't read "a": no such variable
% set x [set $varname]
can't read "varname": no such variable
%
John Lopez
Enterprise PDM Architect
Ulis - thanks, looks helpful.
However, I was thinking more of something like the following pseudo-code:
set a2 "ns"
set b "2"
set ::ns1::ns2::var 1
set x ${::ns1::${a${b}}::var}
where:
b is expanded first to replace the variable with "2"
then, a2 is expanded to replace the variable with...
Ulis - thanks. that does work.
foreach x [namespace children ::xComputer] { puts [set ${x}::HomeLAN] }
note that x contains the fully qualified path from xComputer through & including the sub namespace (only mod), as reported by namespace children.
However, is there no way to nest or...
I am creating a nested namespace to create structures for varied computer information. The base namespace is xComputer, then inside it is ::xComputer::${x} where x=the COMPUTERNAME. Please see code below:
% namespace eval xComputer { }
% set x LOCALHOST
LOCALHOST
% namespace eval...
... indeed I retract ... my statement was more from ignorance than anything ... just a beggar looking for new bread
~(;-}}
Again - many thanks
John Lopez
Enterprise PDM Architect
Guys - tried this out and it works great. Just did a seperate LDAP query per the above in a seperage function def and returns the info needed. Again, thanks.
function GetUserAcctActivationStatus (distinguishedName)
Set objUser = GetObject ("LDAP://"&distinguishedName)...
Colleagues,
thanks for the information. However, did I not 'bind' it to the user via:
"(sAMAccountName="&UserName&"));"
as passed to the code frag above? Should not the recordset contain the queried information?
Thanks again. Your help is most appreciated particularly since I am new to AD...
try creating a VBS file, like bkup.vbs and include the following:
function copyfile(xfile, yfile)
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile xfile, yfile,TRUE
set fso = Nothing
end function
then call it to copy the files in the main() part of your code...
Colleagues,
I have written the following function to extract users data from AD:
function GetUserInformation (UserName)
dim objConnection, objCommand, objRecordSet
CheckUserResult = CheckUser(UserName)
if CheckUserResult = "True" then
Set objConnection =...
Colleagues,
this may be a dumb questions, but I am a relative newbie to VBScript.
In TCL/TK I can load a "library" script into another script via source or other commands. How can I do the same with VBScript, where one script may only contain function calls that I want to commonize to a whole...
Colleagues,
I am attempting to load a script file at runtime into an HTA application. Works fine when the code is local in the HTA, but I want to have it is a seperate file:
//-----------------------------
test.hta content:
//-----------------------------
<html>
<head>
</head>
<script...
... note - I did a visual compare of the 2 DLLs in a hex editor, and found a small difference at address 0000c8-0000c9
fileA = 7f 55
fileB = f7 3f
not really sure why the difference???
John Lopez
Enterprise PDM Architect
john.l.lopez@goodrich.com
Hi trollacious -
no I haven't.
does DIFF do that? I thought this would only be for ascii file comparison.
Do you have a binary editor you use that does this? I have hexedit, but I think it does not have a compare function. I'll check.
Thanks
John Lopez
Enterprise PDM Architect...
yup-
I renamed DLL#2 and did a new compile.
Did an MD5SUM of all 3 and got a different number again.
hummmmmmmmmmm!
John Lopez
Enterprise PDM Architect
john.l.lopez@goodrich.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.