urian84 Posted December 16, 2008 Posted December 16, 2008 Hello!, Sorry for my english if you do not understand something.I have a problem witch a cdrom autoexecutable, the cdrom must register a dll before run the application. I create a batch file.On windows vista it's not possible. When I call regsrvr32 from cd appear acces denied, I believe that is appear of Acces User Control.I trying create msi to register the library but i need register from cd.Can you help me please!Thanks in advance.My mail is urian84@gmail.com if you need.Greetings
MagicAndre1981 Posted December 16, 2008 Posted December 16, 2008 start the script with elevated rights (right click and select "Run as Administrator")
iamtheky Posted December 16, 2008 Posted December 16, 2008 Make sure you are typing regsvr32 (you have a bonus r in yours). Provided that your issue is still the inability to open cmd prompt as an administrator this may work. Im not on my Vista box but I suppose you could write an autoit script that: ****NOT SYNTACTICALLY CORRECT***send "{windows}+r" (think you have to say down and up for the windows key)send "cmd"send "{ctrl}+{shift}+{enter}" - opens as admin(probably need to sleep for a sec or winwaitactive for the dialog)send "{alt}+c" - closes UAC dialogthen the regsvr32 commandexit
urian84 Posted December 17, 2008 Author Posted December 17, 2008 Thanks, the script it´s a good idea but i have a problem witch windows+R. In vbs (i think do script in this language) using the command sendkeys. the key "windows" doesn´t exist, the expresion ("^{ESC}") control+esc is not valid because i don´t add the r in the line.How I can do this script?An example of my script:Option ExplicitDim objShell, WshShellset objShell = CreateObject("WScript.Shell")objShell.SendKeys ("^{ESC}") 'here i need add the key R but i don´t know.
jaclaz Posted December 17, 2008 Posted December 17, 2008 In vbs (i think do script in this language) using the command sendkeys.Good news and bad news. The good news is that it is not YOUR problem.The bad news is that there is not AFAIK a way to do so in VBS (the win+r"):http://www.robvanderwoude.com/challenges.htmlThe other key sequences are doable:http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspxhttp://www.robvanderwoude.com/files/print2_vbs.txtOn the other hand, the suggested AutoIt has this possibility:http://www.autoitscript.com/autoit3/docs/functions/Send.htmjaclaz
urian84 Posted December 18, 2008 Author Posted December 18, 2008 Thank you very much! I will try autoit scripts and ask if I have any problem
urian84 Posted December 18, 2008 Author Posted December 18, 2008 Uff The script is not valid, i need to do these command but i need that the user don't see the process of regsrv32. I need silent mode or similar.Do you know thati it's possible?The cuestion is that i need regiter a dll from cd autorunning, it's necessary for run the application (demo cd), and in windowsXP works perfectly but in vista my problem is the UAC (user control acces) if yo know another form of disable the UAC I would be happy.Thanks in advance.
jaclaz Posted December 18, 2008 Posted December 18, 2008 Well, disabling UAC on a machine just to run a "lousy" (just joking) demo on CD is not exactly a practice that I would pursue.Basically you will decrease the "standard" (mind you I am not saying "right" or "wrong", just "standard") security level of the OS of your Customer.Doing it "silently" is definitely a NO-NO. Your script should explicitly ask for user confirmation before altering the UAC status.Of which DLL are we talking about?How many functions in it are used by your program?Wouldn't it be better make a statically linked program for those? (if doable) jaclaz
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now