OK I got it the way I want it to work, NOW! hehehe always a BUT or NOW...
I need the script to run if the string doesnt exist but if it does to not run. I have tried all day using registrykeyexist with no luck, any thoughts?
Heres the script so far:
Dim sh, v, r
Set sh = WScript.CreateObject("WScript.Shell")
v = Msgbox("Enter Asset Tag Number")
If v = 2 Then
wscript.quit
End if
r = inputbox("ASSET NUMBER")
If r = "empty" Then
sh.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AbbottAsset\Comment", "", "REG_SZ"
Else
sh.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AbbottAsset\Comment", "", "REG_SZ"
sh.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AbbottAsset\Comment", r, "REG_SZ"
End if
msgbox "Asset Tag Information has been entered, Thank You!" ,0, "Finished"
I need the script to run if the string doesnt exist but if it does to not run. I have tried all day using registrykeyexist with no luck, any thoughts?
Heres the script so far:
Dim sh, v, r
Set sh = WScript.CreateObject("WScript.Shell")
v = Msgbox("Enter Asset Tag Number")
If v = 2 Then
wscript.quit
End if
r = inputbox("ASSET NUMBER")
If r = "empty" Then
sh.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AbbottAsset\Comment", "", "REG_SZ"
Else
sh.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AbbottAsset\Comment", "", "REG_SZ"
sh.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AbbottAsset\Comment", r, "REG_SZ"
End if
msgbox "Asset Tag Information has been entered, Thank You!" ,0, "Finished"