Visual Basic script error
-
Hi I have the following line in my vbscript
set dllreg = "wscript.shell"
dllreg.run "regsvr32 /u C:\Program Files (x86)\histori.dll"it is coming out saying "Loadlibrary C:program" failed how to give c:\program files (x86) for that. Also i want it to run silently. How to do that? Please do let me know
-
Hi I have the following line in my vbscript
set dllreg = "wscript.shell"
dllreg.run "regsvr32 /u C:\Program Files (x86)\histori.dll"it is coming out saying "Loadlibrary C:program" failed how to give c:\program files (x86) for that. Also i want it to run silently. How to do that? Please do let me know
regsvr32 /?
regsvr32 /s /u "C:\Program Files (x86)\histori.dll"
Therefore, you are missing the quote delimiters from the path.dllreg.run "regsvr32 /u ""C:\Program Files (x86)\histori.dll"""
-
Hi I have the following line in my vbscript
set dllreg = "wscript.shell"
dllreg.run "regsvr32 /u C:\Program Files (x86)\histori.dll"it is coming out saying "Loadlibrary C:program" failed how to give c:\program files (x86) for that. Also i want it to run silently. How to do that? Please do let me know
You need to enclose the path in quotes. VBScript needs these to be escaped properly as double quotes. So the final line would be
dllreg.run "regsvr32 /u ""C:\Program Files (x86)\histori.dll"""
Either way, I'm surprised that setting dllreg to a string worked. Normally CreateObject is used