Search found 14200 matches

by jvierra
Wed Sep 10, 2008 2:40 am
Forum: Other Scripting Languages
Topic: to get a string from a notepad and use it in html
Replies: 4
Views: 3998

to get a string from a notepad and use it in html

Hah - ust thought of another unique way to understand this message: The original post is for "jscript" and "notepad". Perhaps the user wants to read from an open notepad instance and convert it into html using jscript. Of course the reference to Javascript adds more confusion along with the request ...
by jvierra
Tue Sep 09, 2008 8:14 am
Forum: VBScript
Topic: Adding Group membership of an userID to Excel
Replies: 2
Views: 2909

Adding Group membership of an userID to Excel

Here is the missing user getter safely function. I had to modify it for you case. The is no 'DisplayName" so you need to create it from the till. If yu are looking fo Exchange Display name you need to query a different object for that. It is part of the users mailbox and not teh users account. ' lda...
by jvierra
Tue Sep 09, 2008 5:49 am
Forum: VBScript
Topic: Remove URL shortcuts on remote PC's
Replies: 5
Views: 1965

Remove URL shortcuts on remote PC's

Not al shortcuts on teh desktop are in teh Desktop folder. Some, like Outlook, IE and Office, are in teh registry. You need to use the registry functions or WMI reg provider to remove the registry entry. Try and find the key in the registry hive for the All Users account. You could also use a GPO to...
by jvierra
Tue Sep 09, 2008 2:40 am
Forum: Other Scripting Languages
Topic: to get a string from a notepad and use it in html
Replies: 4
Views: 3998

to get a string from a notepad and use it in html

Here is an example from the WSH help file which is downloadable from Microsoft. function GetLine() {    var fso, f, r;    var ForReading = 1, ForWriting = 2;    fso = new ActiveXObject("Scripting.FileSystemObject");    f = fso.OpenTextFile("c:testfile.txt", ForWriting, true);    f.WriteLine("Hello w...
by jvierra
Mon Sep 08, 2008 9:32 pm
Forum: Windows PowerShell
Topic: how to work with folders and scripts with spaces
Replies: 2
Views: 1908

how to work with folders and scripts with spaces

Look into the use of path in PS here: help about_path_syntax When using a path on teh command line of CMD.EXE or from vbscript or other non-PowerShell start the rules will be those for the execcuting environment except for teh passed arguments. These will follow teh PoSH rules. This - powershell -no...
by jvierra
Mon Sep 08, 2008 8:54 am
Forum: VBScript
Topic: Adding Group membership of an userID to Excel
Replies: 2
Views: 2909

Adding Group membership of an userID to Excel

You should not be getting an error on a reset except if the recordset is empty. Empty recordset don't enumerate so you can safely ignore the error handling. Remove the offending code (comment out for now) and comment out teh "On Error Resume Next". You shouyld not use this line of code if you are no...
by jvierra
Mon Sep 08, 2008 5:22 am
Forum: VBScript
Topic: Formatting VBscript text output?
Replies: 3
Views: 3540

Formatting VBscript text output?

jclegg I take it your a VB programmer. If you review the docs most of what you know of VB is useful but many, if not most, helpful objects do not exists in scripting. YOu cannot Dim with a type using the "As" keyword and teh "New" operator is restricted to internal object only. VBScript is a late bo...
by jvierra
Mon Sep 08, 2008 4:57 am
Forum: VBScript
Topic: list a users group memberships
Replies: 1
Views: 1001

list a users group memberships

Thanks Alexander. Here is a link to the solution code for the LDAP/ADSI solution to this request. http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2237&PID=11754#11754 Here is the code. distinguishedName = "cn=John Smith,ou=Developers,dc=mydomain,dc=com Set objUser = GetObject("LDAP://" & ...
by jvierra
Mon Sep 08, 2008 4:21 am
Forum: VBScript
Topic: Formatting VBscript text output?
Replies: 3
Views: 3540

Formatting VBscript text output?

Hi jclegg Your coed is VBA or VB and will not work in WSH/VBScript. Streamwriter is not available to scripting languages. Here is a link to the vbscript/WSH documentation. Yuo shoould review it to see what works and what doesn't work as most of the VB syntax is modified when using vbscript. http://w...
by jvierra
Sun Sep 07, 2008 11:04 pm
Forum: VBScript
Topic: VBScript to get info from Active Directory
Replies: 2
Views: 855

VBScript to get info from Active Directory



This gets the curretn users info directly, resolves the aDSPath-DN and returns the mail address.

Code: Select all

	
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
WScript.Echo "Email: " & objUser.Get("mail")

	

	
jvierra2008-09-08 06:07:59