Yea, it wouldn't be possible but you can do something like onclick=formname.sessiondata.value='blah' then have a hidden text field named sessiondata. When you run the form action script, have it evaluate sessiondata and if it's not null, then you have to set your session variable. That's how...
Well, easiest thing would be to throw it in a logon script. You could do it in a batch file as something like:
if exist "%systemdrive%\program files\internet explorer\iexplore.exe" "%systemdrive%\program files\internet explorer\iexplore.exe" http://www.google.com"
But...
While this may not be the "best" way, this is how I'd do it. I know looping within a loop is generally slow and to be avoided but it runs fast on my box and I couldn't think of a better/easier way. Just set the ProcessFolder var to the folder with the munged files. The Replace var...
Oh yea, if you want to snag the IP info of a remote system, that is to say run it from your box and get the IPs of another, where it has:
Set WMI = GetObject("winmgmts:" & "!\\.\root\cimv2")
Replace the . in !\\.\ with the name of the PC to scan.
You could also use WMI if the workstation supports it (2k/xp/2k3). If it doesn't, you could push WMI to it. I'd recommend that, because WMI is nice to have available :)
-------------------------------------------------------
Set WMI = GetObject("winmgmts:" &...
No prob. Just remember to clean up those temp batch files. I forgot during one push awhile back and I still come across machines with batches in root from it, hehe. A newer version of psexec may be out that fixes the quirk with parms that'd make the bat unnecessary. I haven't checked lately.
Hmmm. Are you referring to scripts that run somehow specially? Because if you just do start, run, wscript script.vbs it runs as you I thought. At least, that's what username is displayed when you view taskmgr to see who owns which processes.
Here is how I could write this:
-----------------------------------
Set SH = CreateObject("WScript.Shell")
Set FS = CreateObject("Scripting.FileSystemObject")
BatchFile = "h:\test\gWdataXP.bat"
OutputFile = "H:\Test\FTPWEBLOG.TXT"
FindString = "226...
Set SH = CreateObject("WScript.Shell")
SH.Run "%comspec% /c drive:\path\batchname.bat", 0, true
Set SH = Nothing
This will launch it in the background and pause script execution while it runs. To see the window as it runs change 0 to 1. To let the script continue while...
Can't you just shell it?
Set SH = CreateObject("WScript.Shell")
SH.Run "%comspec% /c %systemroot%\system32\runas.exe /user:domain\username blah blah blah..."
Shell to psexec.exe from www.sysinternals.com to fire it off from a remote PC. PSexec starts a process on a remote box. I've seen some issues when it tries to use something with parameters, so usually what I do is create a temp bat file on the c:\ then have something like:
@echo off...
I use <DIV> tags to do this. I have a webpage for people to configure what printer to use for another app.. they pick the print server from a dropdown then it dynamically updates the second dropdown for printer. Here's an example.
<script language=vbscript>
Function updatedrop()
if...
You can save quite some time by not doing .readall and rather doing a read by bytes. 4GuysFromRolla did a review on this, the read all time to parse a meg file was 73.56 seconds versus 0.28 seconds with read :)
http://www.4guysfromrolla.com/webtech/010401-1.shtml
The way I usually do it is using IE to handle the input. Not actually run the code in IE, just use IE itself to process the input. Here's an example snippet from one of my scripts which uses IE to gather user input:
---------------------------------------------------
Set IEX =...
You could do something akin to this:
<script language=vbscript>
function ts_connect()
set sh = createobject("wscript.shell")
sh.run "%systemroot%\system32\mstsc.exe /v:" & data.ip.value
set sh = nothing
end function
</script>
<form name=data>
IP/System to connect...
Yup, using WMI:
SystemName = "machine-to-check"
set tmpObj = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & SystemName & "\root\cimv2").InstancesOf ("Win32_ComputerSystem")
for each tmpItem in tmpObj
MakeModel = trim(tmpItem.Manufacturer) &...
You forgot an & after the first objArgs(1). Also, it's organiZational unit :)
There are some other changes i'd make as well. I prefer to avoid shelling out whenever possible. In order to achieve that goal, I'd use the FileSystemObject to do the copying and deleting. For the share, I'd use...
Hi. I wrote an application to allow printing from my companies Blackberries. You forward the email from the BB to a special email addy, my script then pops that mailbox and when it sees a msg it prints it. The first line of the email tells it where to print to. Problem is, this works great...
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.