All Forums >> [Scripting] >> Post a VBScript >> RE: Dynamic Activity Window Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Posts: 44
Score: 0
Joined: 2/23/2005
From: USA
Status: offline
DiGiTAL.SkReAM
Thank you very much for pointing me to this code. Very nice, to say the least. I plugged in the code below and it does exactly what I want it too do, however I have a consideration you may be able to assist with.
My intention for this script is to give something visual the our VPN users letting then know the VPN login script is doing something and then notify them once it is complete. Otherwise they complain that Lotus Notes is erroring out due to not finding their ID file, etc...Blah blah...
So this works great for kicking off the script as a local admin on the laptop, but when logging in as a non privileged user I get the following error.
Windows Script Host Line: 180 Char: 1 Error: Invalid root in registry key "HKLM\SYSTEM\PROGRESSBAR\MSG". Code: 80070005 Source: WshShell.RegWrite
I attempted to replace "HKLM" with "HKCU" but it too generates almost the exact same error. When "HKCU" is tested with Admin rights it works perfectly.
Any ideas how to get this to run on a non-privileged user account (As we will not\Never allow our users local admin rights?)
Also, I hae been unable to identify where to change the value that forces the status box on top of everything.Any advice would be useful...
Regards,
< Message edited by alienprotein -- 8/4/2006 9:06:05 AM >
Thanks for the tip! I decided to do some testing, so... Created a new winxp virtual machine in vmware server. Created a new user called User. Member of users group only. Opened Regedit and verified that the user was able to modify/add/subtract from HKCU, and that HKLM was refused. User had read only access to HKLM. Ran your script that you posted, it bombed with the same error you reported. I changed the HKLM's to HKCU, and ran it again. It worked as advertised.
Are you running some GPOs that I don't know about, or possibly have some default security settings that prevent this behavior? because everything that i ahve seen and read on the subject suggests that a normal - NON privileged user has change access to HKCU.
Here is the code that ran fine for me: You will notice that I commented out your commands in the very beginning, and that I changed HKLM to HKCU except for inside of the Subroutine 'subKillRegKey'. I had to leave that one so that HKLM nicknames would be recognized.
Here is the answer to your second question:
It finds the PID of the mshta.exe that is running the progressbar hta file, and performs an appactivate on it. The sProgressbarSleepFile that is being run during every do...loop is my own way of doing a "sleep" function from an hta since you can't use 'wscript.sleep(2000)'. Basically, it is a text file taht is created earlier in the script execution that contains the line: wscript.sleep(1000) This gets run giving me a nice sleep function. And then the appactivate forces focus to the hta progressbar.
< Message edited by DiGiTAL.SkReAM -- 8/4/2006 9:29:08 AM >
_____________________________
"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers
"Would you like to touch my monkey?" - Dieter (Mike Meyers)
Posts: 44
Score: 0
Joined: 2/23/2005
From: USA
Status: offline
quote:
Are you running some GPOs that I don't know about, or possibly have some default security settings that prevent this behavior? because everything that i ahve seen and read on the subject suggests that a normal - NON privileged user has change access to HKCU.
You hit the nail right on the head Digital.Skream. Once I moved the test user account from the Test OU to the standard users OU, everything worked.
I just found this code, looking for progressbar code I could shamelessly borrow ... <g>, anyway, I wanted to see what it did so I copied the code into a .vbs file, took the blank line above 'Option Explicit', ran it and got the following error:
Never Mind, I fixed it the problem. Gee, the weather must be making me crazy, anyway, for some strange reason some HTML tags got mixed up in the code. I was like staring right at them but didn't have enough sense to see that was the problem.
Once I got my ass in gear and removed the tags the demo worked perfect.
Digital Screamer, great piece of code, I think this will be very useful for the roll out we are fixing to do.
New info: I was just testing and found that IE 7 beta breaks this class. There is something different with the way that it displays the fonts, I think, that is causing problems with the 'scrolling'. I'm still trying to pin down a fix.
_____________________________
"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers
"Would you like to touch my monkey?" - Dieter (Mike Meyers)
I've tinkered with your problem a little more and still not 100% sure of the reason....Have you tried reinstalling WScript? That may rebind the engine to the browser properly.
Did you do anything to get it to work, or did it just work outta the box for you?
_____________________________
"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers
"Would you like to touch my monkey?" - Dieter (Mike Meyers)
Alot of people on the web are having troubles with IE7, nothing specific towards the scripting engine though. From what I can gather, re-installing one or the other or both fixed a majority of the cases. No one else has had a similar issue with rendering anomalies. So in short...I still have no idea what the problem is, lol