|
Our company is attempting to roll out Windows 7 (SP1) to new client boxes. There is one very large app that is causing the UAC box to pop up asking for administrative rights. Is there a utility or way to determine what section of code is triggering the UAC to popup? The application is very large and it would be nice to narrow down what area is requiring elevated rights.
Thanks for any pointers or guidance ahead of time.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
There's nothing that would cover all possiblities. Even Microsoft ACT[^] can't do it reliably. But, just in case, you'd best give it a try.
|
|
|
|
|
Hey Dave,
Saw your post Friday but forgot to reply. Yeah, I had tried ACT Friday, but didn't have much luck with it for this particular app. Thanks for the response though.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
No problem. We ran into this issue 2 year ago when we were considering moving from XP to Vista and had 1,000 apps to test. We quickly found out that there's nothing out there that can look at every app and tell you, definitively, which apps were going to work and which were going to fail, let alone how they were going to fail.
There's a few thing to look at. The first is if you're going to enable UAC and at which level.
The next is how your applications are going to react in a more restricted environment and how those problems are going to be mitigated. The results of some of this testing may affect the outcome of turning on UAC!
The third thing to look at is the installers for your apps. Depending on your deployment environment, your apps may not even install correctly.
We found a 40-50% failure rate in our installers alone. Most of those problems were easily resolved by either retiring the app if it was no longer needed, making only simple modifications to the installers, upgrading the app to a newer version, or using App-V to run the app.
|
|
|
|
|
I am creating an application were it will check installed applications(in win xp) compatibility for windows 7.
My application will run on machine running win xp and it will inform user that which installed application will have problems in windows 7 environment.
thank you.
|
|
|
|
|
Sounds useful, let us know when it's available for download.
The best things in life are not things.
|
|
|
|
|
Good luck with that! As someone heavily involved in testing 1,000 applications on Windows 7, let me tell you, no tool anyone writes is going to be able to tell you DEFINITIVELY if your applications will run on Windows 7. It's just impossible to tell until you double-click the icon and try everything out.
|
|
|
|
|
yeeh,in vb6 web activex we can call a js function like this
vb6 code
<pre>
UserControl.Parent.Script.Proc ("some msg !")
</pre>
the js function
<pre>
function Proc(msg)
{
alert(msg);
}
</pre>
it's work!
but when the js code like this
<pre>
function Proc(msg)
{
alert(document.getElementById("msg").innerHTML);
}
</pre>
it's not work! and there has an element "msg".why?
and it's error is:
run error "-2147352319(80020101) Automation error"
thnx
-- Modified Wednesday, April 20, 2011 3:31 AM
|
|
|
|
|
Here:
alert(document.getElementById("msg").innerHTML);
Remove the quotes of msg.
|
|
|
|
|
Hello,
I've written plenty of applications ran as scheduled tasks so I never had to worry about this before:
When an application is being ran as windows service: What is the best way to test when the system clock
hits a specific time (1:00am for example)? I know a timer is involved but is there a better way then
just checking at an interval because you couldn't be sure that it would hit 1:00:00 exactly, you'd have
to test a range of when it's greater then 1:00 and less then 1:01 kind of thing?
Please let me know how you do it....
Thanks,
Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
|
|
|
|
|
This maybe absolute overkill for your application, but I still thought I'd point you to this: Quartz.NET[^]. It can be embedded into an application and has "tons" of useful features.
Regards,
|
|
|
|
|
Thanks for the reply. Ya that's a whole lot of functionality for what I have in mind. Thanks though.
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
|
|
|
|
|
yep, you should treat timing values the same as floating-point values, i.e. avoid equality tests.
If your action has to happen at a specific time T, and must be executed for sure, then IMO you should test for
T <= DateTime.Now .
If the action doesn't make sense any more when a span S has elapsed, then test for
*T <= DateTime.Now) And (DateTime.Now < T.Add(S))
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thanks for the reply. Ya I would of done it something like that. Would you choose a timer or a thread.sleep loop?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
|
|
|
|
|
nlarson11 wrote: Would you choose a timer or a thread.sleep loop?
Both are doable, and my choice depends on circumstances.
Threads are more expensive than timers, yet they have automatic state: your thread waits where ever you make it wait, and it knows where it is, even if inside nested methods, loops, etc.
Warning: with a single thread or timer, you can't have two actions running at the same time, which could be good or bad, depends on requirements. With a thread or timer per action (which could be expensive, depending on their number) actions could overlap and interfere with each other.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thanks for the input.
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
You're welcome.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Get present time. Calculate period till specified time. Start a timer to "elapse" after that period. After completion of the job, start the timer again with the same logic.
|
|
|
|
|
I have a VB 6 app that I have rewritten in VB .Net from VS 2010 framework 4. The examples that I've seen from Zebra show the following
Dim SA As SECURITY_ATTRIBUTES
Dim outFile As FileStream, hPortP As IntPtr
LPTPORT = "LPT1"
Texxxt = Me.RichTextBox1.Text
hPort = CreateFile(LPTPORT, GENERIC_WRITE, FILE_SHARE_WRITE, SA, OPEN_EXISTING, 0, 0)
hPortP = New IntPtr(hPort) 'convert Integer to IntPtr
outFile = New FileStream(hPortP, FileAccess.Write, False) 'Create FileStream using Handle
Dim fileWriter As New StreamWriter(outFile)
fileWriter.Write("^XA^FO50,50^A030,30^FD ZEBRA^FS")
This gives me this
'Public Sub New(handle As System.IntPtr, access As System.IO.FileAccess)' is obsolete: 'This constructor has been deprecated. Please use new FileStream(SafeFileHandle handle, FileAccess access) instead.
When I use SafeFileHandle in XP I can print but in Win 7 I get this
{"Invalid handle.Parameter name: handle"}
Here is my code
Public Structure SECURITY_ATTRIBUTES
Private nLength As Integer
Private lpSecurityDescriptor As Integer
Private bInheritHandle As Integer
End Structure
Public Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As SafeFileHandle
Public Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" ( _
ByVal lpFileName As String, _
ByVal dwDesiredAccess As Integer, _
ByVal dwShareMode As Integer, _
<marshalas(unmanagedtype.struct)> ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, _
ByVal dwCreationDisposition As Integer, _
ByVal dwFlagsAndAttributes As Integer, _
ByVal hTemplateFile As IntPtr) As SafeFileHandle
Dim COMPORT As String
Dim hPort As SafeFileHandle
Dim SA As SECURITY_ATTRIBUTES
Dim outFile As FileStream
COMPORT = "COM4"
hPort = CreateFile(COMPORT, GENERIC_WRITE, FILE_SHARE_WRITE, SA, OPEN_EXISTING, 0, 0)
outFile = New FileStream(hPort, FileAccess.Write, 8, False)
Dim fileWriter As New StreamWriter(outFile)
fileWriter.Write("^XA") ' Start format
the invalid handle is hPort. Does anyone have an answer and how to correct? TIA
Ed Mee
|
|
|
|
|
You cannot open LPT1 like that. The code sample you found will only work on Windows 9x.
There's another way to do it here[^].
|
|
|
|
|
I found an easier solution. I'm using the SerialPort class.
Dim ComSerialPort As SerialPort
ComSerialPort = New SerialPort("COM4", 9600, Parity.None, 8, StopBits.One)
ComSerialPort.Open()
'Setup Media profile then print
For i1 = 1 To (Conversion.Val(txtPartQty.Text) * Conversion.Val(txtBandQty.Text)) Step 1
ComSerialPort.WriteLine("^XA") ' Start format
ComSerialPort.Write(strLL) ' Sets Label length
ComSerialPort.Write("^POI") ' Print orientation inverted 180 degrees
If optPlastic.Checked Then
ComSerialPort.Write("^MD25") ' Media darkness for plastic
End If
For i2 As Integer = 1 To intLines Step 1
ComSerialPort.Write(strLine(i2 - 1))
Next i2
ComSerialPort.Write("^XZ")
Next i1
ComSerialPort.Close()
Ed Mee
|
|
|
|
|
Your original code said LPT port, but I didn't see the COM port designation in the second code snippet. Over serial, this is much easier to do.
|
|
|
|
|
Hi,
Actually i converted my Vb.Net2008 project to 2010. But after to the convertion everything goes fine except SQLDMO.
I used the below code to create a backup & rename & restore in in the same server... And this can be useful at yearend backup like
database name "My_Procurement_Db" can be restored as "My_Procurement_Db_2010".....
The codes I used
Dim backup As Microsoft.SqlServer.SQLDMO.Backup = New SQLDMO.BackupClass()
Dim oServer As SQLDMO.SQLServer = New SQLDMO.SQLServerClass()
oServer.LoginSecure = True
oServer.Connect("198.198.3.90", "sa", "123")
backup.Action = SQLDMO.SQLDMO_BACKUP_TYPE.SQLDMOBackup_Database
backup.Database = "My_Procurement_Db"
backup.Files = PurDbName
backup.BackupSetName = "Procurement_Analysis"
backup.BackupSetDescription = "Database Backup Description"
backup.Initialize = True
backup.SQLBackup(oServer)
'RESTORE PROCESS STARTED
Dim oRestore As SQLDMO.Restore
Dim qRest As SQLDMO.QueryResults
Dim LDNames(1) As String
oRestore = New SQLDMO.Restore
With oRestore
.Database = "My_Procurement_db_2010"
.Action = SQLDMO.SQLDMO_RESTORE_TYPE.SQLDMORestore_Database
.ReplaceDatabase = True
.Files = PurDbName
qRest = .ReadFileList(oServer)
LDNames(0) = qRest.GetColumnString(1, 1)
LDNames(1) = qRest.GetColumnString(2, 1)
.RelocateFiles = "[" & LDNames(0) & "],[D:\test.mdf]" _
+ ",[" & LDNames(1) & "],[D:\testlog.ldf]"
.SQLRestore(oServer)
End With
oRestore = Nothing
oServer.DisConnect()
oServer = Nothing
Any Ides For Me ?
Thanks & Regards
PARAMU
|
|
|
|
|
Whats the problem?
Isn't it working as expected? if so what does it do and what should it do
Error messages?
As barmey as a sack of badgers
Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
|
|
|
|
|
Paramu1973 wrote: Any Ides For Me ?
Yes, beware of March.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|