It appears from your post that graphicCode is being declared twice. If you declare it globally, you don't need to pass it to or from a function since you are modifying the global variable.
Try this: remove the declaration from the function and replace:
graphicCode() =...
In theory that should work...In practice it doesn't. I tried that approach initially and it didn't work.
What I ended up doing was creating an HTA app. It took a while, but the interface is so much simpler now. I also created an XML file to hold the menu information, so all I needed to do...
Thanks for the response.
An HTA interface would require extensive reprogramming since this batch file is quite complex...and I don't have a lot of HTML experience. I am looking for a quicker fix since this is needed soon.
I tried the WshShell.exec method, but it will not display a command...
I am trying to replace an old batch file with a vbscript application running under cscript.exe in a DOS window. My problem is that I am using menus and need a way to clear the old menu so I can print the new one. I cannot get the DOS command "CLS" to work from within the script and have pretty...
Set Filesys = CreateObject("scripting.filesystemobject")
Filesys.CopyFile(<path & filename>, <path & filename>, True)
The "True" at the end tells it to replace the destination file if it exists...obviously "False" does just the opposite.
Dana Hallenbeck
Try it on multiple accounts...if you are not already. See if you get data on any of them. Do you get other properties if you query them(ie - user.fullname, user.name, etc.)
Try making the query more specific:
Set user = GetObject("WinNT://<domain>/<username>,user")
wscript.echo...
Try this. You can still use ADSI in a WINNT environment.
Set user = GetObject("WinNT://<domain>/<username>")
wscript.echo user.lastlogin
Dana Hallenbeck
Something else you may want to look at is the cables. I noticed with the lp2000r's that some of my drive problems were the result of a single strand of the SCSI 3 cable being severed. There is a lot of sheet metal and sharp edges in the HP server boxes...
Take a close look at the cables, or...
Try something like:
set logfile = filesys.opentextfile("location",1,True)
This is just the basic syntax. A good resource for basic information on writing or manipulating files is http://www.devguru.com
good luck
dana hallenbeck
Try something like this:
Dim filesys, folder, folders, subfolder
Set filesys = CreateObject("scripting.filesystemobject")
Set folders = filesys.getfolder("d:\users")
For Each folder In folders.subfolders
Set subfolder = filesys.GetFolder(folder.Path &...
Something else you could do is centrally locate a dll or ocx on a common network share. This could then be registered and unregistered (via the script) by any computer with access to that share without actually being depolyed to that computer.
Dana Hallenbeck
There are functions and classes freely available on the web that allow manipulation of ini files. Try searching for "vbscript read ini file". You can also try this link:
http://home.att.net/~wshvbs/wshIniClassPage.htm
Good luck
Dana Hallenbeck
I have found the best way to do this is to Shell out an "at" command. The COM interface for this procedure is limited unless you download a more robust dll for scheduling tasks.
Example:
dim WshShell
set WshShell = CreateObject("Wscript.Shell")
WshShell.run "at...
You could probably query the Exchange servers, but that would kind of defeat the purpose of this script.
Sorry...off hand, I can't think of anything. I will keep my eye out for a possible solution, though.
Dana Hallenbeck
This will loop thru the users in an Active Directory OU and give you their mail server. You can adapt it to what you need.
Set ADSrv = GetObject("LDAP://yourdomain.com/OU=UsersOU,DC=yourdomain,DC=com")
For Each user In ADSrv
wscript.echo user.msExchHomeServerName
next
Dana Hallenbeck
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.