vbscript


InstallShield - Using vbscript to write to registry


The following code is a peace of a script that is set up to be executed by InstallShield when installing my application: Custom Actions During Installation > After Register Product
Set wsShell = CreateObject("WScript.Shell")
wsShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\My Program\FilePath", "{the file path}"
When I run the script from command line it runs as it should and writes to the registry. But when I try to use the setup file it shows no errors, but the registry value is not set.
Why is it not working?
I'm running it as administrator.
You can use this code to log information in you msi log, it might help you figure out what is happening
Function LogMSIInfo(msg,msgtype)
Dim rec
Set rec = Session.Installer.CreateRecord(1)
rec.StringData(0) = msg
LogMSIInfo = Session.Message(&H04000000, rec)
End Function

Related Links

VBScript To Remove Number from filename
Sparx Enterprise Architect to get the Tagged ┬┤Value from otDiagram VB Script code
Can we code a hold key function in a vb script
Microsoft.Jet.OLEDB.4.0 - Provider cannot be found. It may not be properly installed
Restarting Computer via VBS
Can we number tag items on a window like in speech recognition
saving file with download prompt with vbscript
Object dosen't support this property or method document.getElementById().Value
how to remove value after comma(,) using vbscript and classic asp
vbscript windows xp warning message based on date
VBScript XCopy to local disk not working
How to monitor a folder with all subfolders and within the subfolder
I want to move the file from the directory (2) in the subdirectory (1) to a subdirectory (1) and delete the folder (2) by VBScript
Setting homedrive via VBScript
create shortcut with vbs
Search in active directory forest

Categories

HOME
blogger
pypi
reflection
isabelle
pycharm
reserved
react-virtualized
view
elm
infragistics
yum
fancybox
onelogin
swagger-ui
upload
multiple-records
gnupg
quickbooks
flask-wtforms
carthage
vaadin7
dosgi
invantive-sql
google-cloud-speech
nas
claims-based-identity
trading
java-7
django-storage
user-interaction
virtualdub
traffic
fifo
fluentvalidation
dbclient
flink-streaming
google-qpx-express-api
avcapturesession
http-referer
mapdb
x11-forwarding
hockeyapp
serverside-rendering
occlusion
angularjs-factory
email-templates
hp-ux
grid.mvc
node-gyp
bootstrap-dialog
http-redirect
gpx
avconv
strptime
clean-architecture
dotnetzip
worker-thread
kbuild
pg-dump
android-cursor
knpmenubundle
dwscript
gridpane
url-masking
jwplayer7
disque
hill-climbing
essence
bluemix-app-scan
suffix-tree
netmq
freedesktop.org
ora-00900
cannon.js
qdialog
libressl
javax.mail
offloading
jscript.net
tablelayout
tt-news
asp.net-dynamic-data
android-nested-fragment
eol
funcunit
valueconverter
hippomocks
xceed-datagrid
seaside
resty-gwt
farseer
quantlib-swig
dexterity
blending
ruby-datamapper
ftps
easy-install
sharp-repository
lcs
angularjs-controller
simba
getmessage
gnu-prolog
pydot
locationlistener
datareader
fluent-interface
vc90
adrotator
zend-decorators
port-number

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App