Active setup
Hi
I have used activesetup to call a vbscript when the user logs in. When the user logs in the script is running but it is not doing the exact action for which i have implemented the activesetup. Script will write some registries to HKCU\ hive. Script is working fine without any issues. When i manually execute the script, it does work. But when user logs in, it popups messages but does not do the required stuff. Very stupid and strange.
I spent a lot of time, but of no use. any suggestions please.
Regards
Ramesh
I have used activesetup to call a vbscript when the user logs in. When the user logs in the script is running but it is not doing the exact action for which i have implemented the activesetup. Script will write some registries to HKCU\ hive. Script is working fine without any issues. When i manually execute the script, it does work. But when user logs in, it popups messages but does not do the required stuff. Very stupid and strange.
I spent a lot of time, but of no use. any suggestions please.
Regards
Ramesh
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
cygan
13 years ago
Posted by:
ramesh111k
13 years ago
Yes script is working perfectly when I execute it manually.
I have used stubpath = "path of the vbs like " "c:\program files\xxx.vbs"
Yes the xxx.vbs exists in c:\program files\
The requirement was that it should be in vbscript. so no .msi can be used as per the client's requirement.
OOPs. I was scratching my head to find out the reason, finally I am putting the same script in Run registry, which is not a best practise. Please let me know if anyone experienced the same.
One more thing. when user logs in there are some drives which get mapped. Is it because of this . Not sure
I have used stubpath = "path of the vbs like " "c:\program files\xxx.vbs"
Yes the xxx.vbs exists in c:\program files\
The requirement was that it should be in vbscript. so no .msi can be used as per the client's requirement.
OOPs. I was scratching my head to find out the reason, finally I am putting the same script in Run registry, which is not a best practise. Please let me know if anyone experienced the same.
One more thing. when user logs in there are some drives which get mapped. Is it because of this . Not sure
Posted by:
shweta_kar
13 years ago
Posted by:
ramesh111k
13 years ago
No I did not. What I have specified is stubpath = "C:\ProgramFiles\xxx.vbs"
I am executing a vbscript in system context and when user logs in I wanted another script to run to write HKCU registries. So I used activesetup.
and as specified above, i was writing a HKLM registry (activesetup) with the value stubpath = "C:\ProgramFiles\xxx.vbs" .
Please suggest is wscript.exe should be specified mandatorily.
I am executing a vbscript in system context and when user logs in I wanted another script to run to write HKCU registries. So I used activesetup.
and as specified above, i was writing a HKLM registry (activesetup) with the value stubpath = "C:\ProgramFiles\xxx.vbs" .
Please suggest is wscript.exe should be specified mandatorily.
Posted by:
dj_xest
13 years ago
Hi ramesh111k,
There are few things you may want to consider when running an active setup especially when it is an executable like your vb script. If you are logging in as a restricted user to run that script via Active Setup, you will not be allowed to execute that. The reason is obvious. The very easy way to populate that HKCU hive is to put your registry in your project, i.e. .WSI, IST or MST if it´s a vendor MSI and populate the Active Setup with a repair.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{GUID}]
"@"="{Nameofyourapp or something}"
"Version"="{Version-i.e. 1,0}"
"StubPath"="msiexec.exe /fu {GUID} /quiet"
If you are persistent and you have some executables to work on to that user if he has admin rights, try what shweta_kar said. Try to list your Active Setup reg keys here and let´s see what we can find out.
There are few things you may want to consider when running an active setup especially when it is an executable like your vb script. If you are logging in as a restricted user to run that script via Active Setup, you will not be allowed to execute that. The reason is obvious. The very easy way to populate that HKCU hive is to put your registry in your project, i.e. .WSI, IST or MST if it´s a vendor MSI and populate the Active Setup with a repair.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{GUID}]
"@"="{Nameofyourapp or something}"
"Version"="{Version-i.e. 1,0}"
"StubPath"="msiexec.exe /fu {GUID} /quiet"
If you are persistent and you have some executables to work on to that user if he has admin rights, try what shweta_kar said. Try to list your Active Setup reg keys here and let´s see what we can find out.
Posted by:
turbokitty
13 years ago
on top of all that, I find active setup to be very unreliable. I'd use a vbscript CA in an MSI that's triggered by an HKCU dummy key.
<edit> I just read the whole thread and apparently an MSI is not an option. Besides, he's deploying HKCU keys with the VB so a CA would be useless.
I think relying on Active Setup for anything is a poor idea.
<edit>
<edit> I just read the whole thread and apparently an MSI is not an option. Besides, he's deploying HKCU keys with the VB so a CA would be useless.
I think relying on Active Setup for anything is a poor idea.
<edit>

so that the conversation will remain readable.